Description of problem: ipauser module is not able to add gecos field: ~~~ - name: Playbook to handle users hosts: ipaserver become: true tasks: - ipauser: ipaadmin_password: '{{ ipaadmin_password }}' name: user1 first: UserFirst last: UserLast phone: "+1234567890" email: user1 password: "mypassword" gecos: UserFirst <<<<<===== update_password: on_create ~~~ ~~~ fatal: [<...>]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (ipauser) module: gecos. Supported parameters include: phone (telephonenumber), nomembers, preserve, radius (ipatokenradiusconfiglink), userclass (class), mobile, manager, preferredlanguage, shell (loginshell), update_password, principalexpiration (krbprincipalexpiration), userauthtype (ipauserauthtype), title, userstate (st), noprivate, state, users, ipaadmin_password, name (login), passwordexpiration (krbpasswordexpiration), certificate (usercertificate), certmapdata, displayname, password, employeenumber, random, carlicense, ipaadmin_principal, radiususer (ipatokenradiususername, radiususername), last (sn), ipaapi_context, city, gid (gidnumber), homedir, email, departmentnumber, pager, uid (uidnumber), initials, employeetype, fax (facsimiletelephonenumber), sshpubkey (ipasshpubkey), first (givenname), action, principal (krbprincipalname, principalname), postalcode (zip), ipaapi_ldap_cache, orgunit (ou), fullname (cn)."} ~~~ The field is not in source code in v1.9.2 https://github.com/freeipa/ansible-freeipa/blob/v1.9.2/plugins/modules/ipauser.py ----- This field is supported in command line: ~~~ $ ipa user-add -h Usage: ipa [global-options] user-add LOGIN [options] Add a new user. Options: -h, --help show this help message and exit --first=STR First name --last=STR Last name --cn=STR Full name --displayname=STR Display name --initials=STR Initials --homedir=STR Home directory --gecos=STR GECOS <<<<<===== --shell=STR Login shell ~~~
Upstream PR: https://github.com/freeipa/ansible-freeipa/pull/1039
Verified ansible-core-2.15.1-1.el8.x86_64 ansible-freeipa-1.11.1-1.el8.noarch PASSED ansible_freeipa_tests/user/test_user.py::TestUserModule::test_user_add_with_gecos PASSED ansible_freeipa_tests/user/test_user.py::TestUserModule::test_user_update_gecos_field PASSED ansible_freeipa_tests/user/test_user.py::TestUserModule::test_user_reset_gecos_field PASSED ansible_freeipa_tests/user/test_user.py::TestUserModule::test_user_add_gecos_with_unicode_char Based on the above test result, marking the bug Verified