Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (ansible-freeipa bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHEA-2023:2752
Description of problem: Require a clear error message while updating netbios_name without enable_sid in ipaconfig module Version-Release number of selected component (if applicable): # cat /etc/redhat-release Red Hat Enterprise Linux release 8.8 Beta (Ootpa) ansible-freeipa-1.8.4-1.el9.noarch ipa-server-4.9.10-6.module+el8.7.0+16405+581a7c1e.x86_64 [root@ansible ~]# cat config_module.yml --- - name: Playbook to ensure not able to update netbios_name without enable_sid. hosts: ipaserver tasks: - ipaconfig: ipaadmin_password: <xxxxxxxx> netbios_name: NEWTESTNETBIOS [root@ansible ~]# ansible-playbook -vv -i inventory/config.hosts config_module.yml PLAYBOOK: config_module.yml ********************************************************************************************************** 1 plays in config_module.yml PLAY [Playbook to ensure not able to update netbios_name without enable_sid.] ******************************************************** TASK [Gathering Facts] *************************************************************************************************************** task path: /root/config_module.yml:2 ok: [master.ipadomain.test] META: ran handlers TASK [ipaconfig] ********************************************************************************************************************* task path: /root/config_module.yml:6 fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "msg": "fail_json() takes 1 positional argument but 2 were given"} PLAY RECAP *************************************************************************************************************************** master.ipadomain.test : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 Actual results: FAILED! => {"changed": false, "msg": "fail_json() takes 1 positional argument but 2 were given"} Expected results: FAILED! => {"changed": false, "msg": "'enable-sid: yes' required for 'netbios_name' and 'add-sids'."} Additional info: This behavior is not observed in RHEL 9.2 ansible-playbook -vvv ====================== TASK [ipaconfig] ********************************************************************************************************************* task path: /root/config_module.yml:6 <master.ipadomain.test> ESTABLISH SSH CONNECTION FOR USER: None <master.ipadomain.test> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/36a11f6e85 master.ipadomain.test '/bin/sh -c '"'"'echo ~ && sleep 0'"'"'' <master.ipadomain.test> (0, b'/root\n', b'') <master.ipadomain.test> ESTABLISH SSH CONNECTION FOR USER: None <master.ipadomain.test> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/36a11f6e85 master.ipadomain.test '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1663685132.7933602-31433-134751976044000 `" && echo ansible-tmp-1663685132.7933602-31433-134751976044000="` echo /root/.ansible/tmp/ansible-tmp-1663685132.7933602-31433-134751976044000 `" ) && sleep 0'"'"'' <master.ipadomain.test> (0, b'ansible-tmp-1663685132.7933602-31433-134751976044000=/root/.ansible/tmp/ansible-tmp-1663685132.7933602-31433-134751976044000\n', b'') Using module file /root/ansible-freeipa/plugins/modules/ipaconfig.py <master.ipadomain.test> PUT /root/.ansible/tmp/ansible-local-31416mb1sfqmf/tmplg6hfptp TO /root/.ansible/tmp/ansible-tmp-1663685132.7933602-31433-134751976044000/AnsiballZ_ipaconfig.py <master.ipadomain.test> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/36a11f6e85 '[master.ipadomain.test]' <master.ipadomain.test> (0, b'sftp> put /root/.ansible/tmp/ansible-local-31416mb1sfqmf/tmplg6hfptp /root/.ansible/tmp/ansible-tmp-1663685132.7933602-31433-134751976044000/AnsiballZ_ipaconfig.py\n', b'') <master.ipadomain.test> ESTABLISH SSH CONNECTION FOR USER: None <master.ipadomain.test> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/36a11f6e85 master.ipadomain.test '/bin/sh -c '"'"'chmod u+x /root/.ansible/tmp/ansible-tmp-1663685132.7933602-31433-134751976044000/ /root/.ansible/tmp/ansible-tmp-1663685132.7933602-31433-134751976044000/AnsiballZ_ipaconfig.py && sleep 0'"'"'' <master.ipadomain.test> (0, b'', b'') <master.ipadomain.test> ESTABLISH SSH CONNECTION FOR USER: None <master.ipadomain.test> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/36a11f6e85 -tt master.ipadomain.test '/bin/sh -c '"'"'/usr/libexec/platform-python /root/.ansible/tmp/ansible-tmp-1663685132.7933602-31433-134751976044000/AnsiballZ_ipaconfig.py && sleep 0'"'"'' <master.ipadomain.test> (1, b'\r\n{"msg": "fail_json() takes 1 positional argument but 2 were given", "failed": true, "exception": " File \\"/tmp/ansible_ipaconfig_payload_t7bx019o/ansible_ipaconfig_payload.zip/ansible/module_utils/ansible_freeipa_module.py\\", line 995, in ipa_connect\\n yield ccache_name\\n File \\"/tmp/ansible_ipaconfig_payload_t7bx019o/ansible_ipaconfig_payload.zip/ansible/modules/ipaconfig.py\\", line 485, in main\\n", "invocation": {"module_args": {"ipaadmin_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "netbios_name": "NEWTESTNETBIOS", "ipaadmin_principal": "admin", "ipaapi_ldap_cache": true, "maxusername": null, "maxhostname": null, "homedirectory": null, "defaultshell": null, "defaultgroup": null, "emaildomain": null, "searchtimelimit": null, "searchrecordslimit": null, "usersearch": null, "groupsearch": null, "enable_migration": null, "groupobjectclasses": null, "userobjectclasses": null, "pwdexpnotify": null, "configstring": null, "selinuxusermaporder": null, "selinuxusermapdefault": null, "pac_type": null, "user_auth_type": null, "ca_renewal_master_server": null, "domain_resolution_order": null, "enable_sid": null, "add_sids": null, "ipaapi_context": null}}}\r\n', b'Shared connection to master.ipadomain.test closed.\r\n') <master.ipadomain.test> Failed to connect to the host via ssh: Shared connection to master.ipadomain.test closed. <master.ipadomain.test> ESTABLISH SSH CONNECTION FOR USER: None <master.ipadomain.test> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/36a11f6e85 master.ipadomain.test '/bin/sh -c '"'"'rm -f -r /root/.ansible/tmp/ansible-tmp-1663685132.7933602-31433-134751976044000/ > /dev/null 2>&1 && sleep 0'"'"'' <master.ipadomain.test> (0, b'', b'') The full traceback is: File "/tmp/ansible_ipaconfig_payload_t7bx019o/ansible_ipaconfig_payload.zip/ansible/module_utils/ansible_freeipa_module.py", line 995, in ipa_connect yield ccache_name File "/tmp/ansible_ipaconfig_payload_t7bx019o/ansible_ipaconfig_payload.zip/ansible/modules/ipaconfig.py", line 485, in main fatal: [master.ipadomain.test]: FAILED! => { "changed": false, "invocation": { "module_args": { "add_sids": null, "ca_renewal_master_server": null, "configstring": null, "defaultgroup": null, "defaultshell": null, "domain_resolution_order": null, "emaildomain": null, "enable_migration": null, "enable_sid": null, "groupobjectclasses": null, "groupsearch": null, "homedirectory": null, "ipaadmin_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "ipaadmin_principal": "admin", "ipaapi_context": null, "ipaapi_ldap_cache": true, "maxhostname": null, "maxusername": null, "netbios_name": "NEWTESTNETBIOS", "pac_type": null, "pwdexpnotify": null, "searchrecordslimit": null, "searchtimelimit": null, "selinuxusermapdefault": null, "selinuxusermaporder": null, "user_auth_type": null, "userobjectclasses": null, "usersearch": null } }, "msg": "fail_json() takes 1 positional argument but 2 were given" }