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.
Bug 2127446 - [ansible-freeeipa] It should not be possible to disable SID from ipa config module, and the error message should be clear
Summary: [ansible-freeeipa] It should not be possible to disable SID from ipa config m...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: ansible-freeipa
Version: 9.2
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Rafael Jeffman
QA Contact: Varun Mylaraiah
URL:
Whiteboard:
Depends On:
Blocks: 2127447 2135757
TreeView+ depends on / blocked
 
Reported: 2022-09-16 11:28 UTC by Varun Mylaraiah
Modified: 2023-05-09 08:03 UTC (History)
3 users (show)

Fixed In Version: ansible-freeipa-1.9.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2127447 2135757 (view as bug list)
Environment:
Last Closed: 2023-05-09 07:25:35 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-8752 0 None None None 2022-09-16 11:34:13 UTC
Red Hat Issue Tracker RHELPLAN-134170 0 None None None 2022-09-16 11:34:23 UTC
Red Hat Product Errata RHEA-2023:2168 0 None None None 2023-05-09 07:25:50 UTC

Description Varun Mylaraiah 2022-09-16 11:28:52 UTC
Description of problem:
Required a clear error message while disabling SID (enable_sid: no) from ipa config module

Version-Release number of selected component (if applicable):
 1.8.4-1

How reproducible:
100%

Steps to Reproduce:

cat config_module.yml
---
- name: Playbook to verify error message
  hosts: ipaserver
 
  tasks:
  - ipaconfig:
      ipaadmin_password: <xxxxxxx>
      enable_sid: no


[root@ansible ~]# ansible-playbook -vv -i inventory/config.hosts config_module.yml
ansible-playbook [core 2.13.3]
  config file = /root/ansible.cfg
PLAYBOOK: config_module.yml ********************************************************************
1 plays in config_module.yml
 
PLAY [Playbook to verify error message] ***********************
 
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": "unhashable type: 'dict'"}

Comment 1 Rafael Jeffman 2022-09-21 22:35:48 UTC
Upstream PR: https://github.com/freeipa/ansible-freeipa/pull/921

Comment 7 Varun Mylaraiah 2022-12-20 13:17:42 UTC
Verified
ansible-core-2.14.1-1.el9.x86_64
ansible-freeipa-1.9.0-1.el9.noarch

Passed	ansible_freeipa_tests/config/test_config.py::TestConfigInvalid::test_enable_sid_with_no
------------------------------ Captured log call -------------------------------
INFO     pytest_multihost.host.Host.ansible.OpenSSHTransport:transport.py:397 RUN ['/usr/bin/rpm', '-q', 'ansible-freeipa']
DEBUG    pytest_multihost.host.Host.ansible.cmd161:transport.py:519 RUN ['/usr/bin/rpm', '-q', 'ansible-freeipa']
DEBUG    pytest_multihost.host.Host.ansible.cmd161:transport.py:563 bash: line 1: cd: /root/multihost_tests: No such file or directory
DEBUG    pytest_multihost.host.Host.ansible.cmd161:transport.py:563 bash: line 2: /root/multihost_tests/env.sh: No such file or directory
DEBUG    pytest_multihost.host.Host.ansible.cmd161:transport.py:563 ansible-freeipa-1.9.0-1.el9.noarch
DEBUG    pytest_multihost.host.Host.ansible.cmd161:transport.py:217 Exit code: 0
INFO     pytest_multihost.host.Host.ansible.OpenSSHTransport:transport.py:433 PUT inventory/config.hosts
DEBUG    pytest_multihost.host.Host.ansible.cmd162:transport.py:519 RUN ['tee', 'inventory/config.hosts']
DEBUG    pytest_multihost.host.Host.ansible.cmd162:transport.py:217 Exit code: 0
INFO     pytest_multihost.host.Host.ansible.OpenSSHTransport:transport.py:433 PUT config_module.yml
DEBUG    pytest_multihost.host.Host.ansible.cmd163:transport.py:519 RUN ['tee', 'config_module.yml']
DEBUG    pytest_multihost.host.Host.ansible.cmd163:transport.py:217 Exit code: 0
INFO     pytest_multihost.host.Host.ansible.OpenSSHTransport:transport.py:397 RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/config.hosts', 'config_module.yml']
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:519 RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/config.hosts', 'config_module.yml']
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 bash: line 1: cd: /root/multihost_tests: No such file or directory
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 bash: line 2: /root/multihost_tests/env.sh: No such file or directory
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 ansible-playbook [core 2.14.1]
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563   config file = /etc/ansible/ansible.cfg
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563   configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563   ansible python module location = /usr/lib/python3.9/site-packages/ansible
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563   ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563   executable location = /usr/bin/ansible-playbook
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563   python version = 3.9.16 (main, Dec  8 2022, 00:00:00) [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)] (/usr/bin/python3.9)
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563   jinja version = 3.1.2
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563   libyaml = True
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 Using /etc/ansible/ansible.cfg as config file
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 Skipping callback 'default', as we already have a stdout callback.
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 Skipping callback 'minimal', as we already have a stdout callback.
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 Skipping callback 'oneline', as we already have a stdout callback.
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 PLAYBOOK: config_module.yml ****************************************************
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 1 plays in config_module.yml
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 PLAY [Playbook to ensure SID disables(enable_sid no) is not possible.] *********
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 TASK [Gathering Facts] *********************************************************
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 task path: /root/config_module.yml:2
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 ok: [master.ipadomain.test]
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 TASK [ipaconfig] ***************************************************************
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 task path: /root/config_module.yml:6
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "msg": "SID cannot be disabled."}
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 PLAY RECAP *********************************************************************
DEBUG    pytest_multihost.host.Host.ansible.cmd164:transport.py:563 master.ipadomain.test      : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

Based on the test result, marking the bug Verified

Comment 10 errata-xmlrpc 2023-05-09 07:25:35 UTC
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:2168


Note You need to log in before you can comment on or make changes to this bug.