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 1976922 - [ansible-freeipa] Not able to update existing automember rule description.
Summary: [ansible-freeipa] Not able to update existing automember rule description.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: ansible-freeipa
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Rafael Jeffman
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks: 2021393
TreeView+ depends on / blocked
 
Reported: 2021-06-28 14:52 UTC by Varun Mylaraiah
Modified: 2022-05-17 13:09 UTC (History)
3 users (show)

Fixed In Version: ansible-freeipa-1.5.3-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2021393 (view as bug list)
Environment:
Last Closed: 2022-05-17 12:47:27 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-7202 0 None None None 2021-11-01 12:19:23 UTC
Red Hat Product Errata RHBA-2022:2395 0 None None None 2022-05-17 12:47:40 UTC

Description Varun Mylaraiah 2021-06-28 14:52:52 UTC
Description of problem:
In the Automember module, not able to update the existing automember rule description.
Currently, the task is creating a new automember that is replacing the old one.


Version-Release number of selected component (if applicable):
ansible-freeipa-0.3.6-3.el8.noarch

Steps to Reproduce:
Before
#######
[root@master ~]# ipa automember-show --type=hostgroup 01automemb_hostgroup
  Automember Rule: 01automemb_hostgroup
  Description: Automember rule
  Inclusive Regex: cn=@1
  Exclusive Regex: cn=s


# cat automember_module.yaml
---
- name: Playbook to ensure a host group automember rule is present with an updated description.
  hosts: ipaserver
  become: yes
 
  tasks:
  - ipaautomember:      
      ipaadmin_principal: admin
      ipaadmin_password: <xxxxxxxx>
      name: 01automemb_hostgroup
      description: New Automember rule
      automember_type: hostgroup

[root@ansible ~]# ansible-playbook -vv -i inventory/automember.hosts automember_module.yml 



After
######
[root@master ~]# ipa automember-show --type=hostgroup 01automemb_hostgroup
  Automember Rule: 01automemb_hostgroup
  Description: New Automember rule


Actual results:
Task is creating a new automember rule that is replacing the old one

Expected results:
Should update existing automember rule.

Additional info:

Comment 3 Rafael Jeffman 2021-11-03 21:03:10 UTC
Upstream PR: https://github.com/freeipa/ansible-freeipa/pull/675

Comment 9 Varun Mylaraiah 2022-01-17 05:57:11 UTC
Verified
ansible-freeipa-1.5.3-1.el9
ansible-core-2.12.1-1.el9

2022-01-15T14:57:07 ansible_freeipa_tests/automember/test_automember.py::TestAutomember::test_automember_hostgroup_rule_update_description_only PASSED [ 69%]


==============
Console-Output
==============

ansible_freeipa_tests/automember/test_automember.py::TestAutomember::test_automember_hostgroup_rule_update_description_only


2022-01-15T14:56:57+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['kinit', 'admin']
2022-01-15T14:56:57+0000 [pytest_multihost.host.Host.master.cmd149] DEBUG RUN ['kinit', 'admin']
2022-01-15T14:56:57+0000 [pytest_multihost.host.Host.master.cmd149] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:56:57+0000 [pytest_multihost.host.Host.master.cmd149] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:56:57+0000 [pytest_multihost.host.Host.master.cmd149] DEBUG Password for admin: 
2022-01-15T14:56:57+0000 [pytest_multihost.host.Host.master.cmd149] DEBUG Exit code: 0
2022-01-15T14:56:57+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['ipa', 'automember-add', '--type=hostgroup', '03automemb_hostgroup', '--desc=testing']
2022-01-15T14:56:57+0000 [pytest_multihost.host.Host.master.cmd150] DEBUG RUN ['ipa', 'automember-add', '--type=hostgroup', '03automemb_hostgroup', '--desc=testing']
2022-01-15T14:56:57+0000 [pytest_multihost.host.Host.master.cmd150] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:56:57+0000 [pytest_multihost.host.Host.master.cmd150] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:56:58+0000 [pytest_multihost.host.Host.master.cmd150] DEBUG --------------------------------------------
2022-01-15T14:56:58+0000 [pytest_multihost.host.Host.master.cmd150] DEBUG Added automember rule "03automemb_hostgroup"
2022-01-15T14:56:58+0000 [pytest_multihost.host.Host.master.cmd150] DEBUG --------------------------------------------
2022-01-15T14:56:58+0000 [pytest_multihost.host.Host.master.cmd150] DEBUG   Automember Rule: 03automemb_hostgroup
2022-01-15T14:56:58+0000 [pytest_multihost.host.Host.master.cmd150] DEBUG   Description: testing
2022-01-15T14:56:58+0000 [pytest_multihost.host.Host.master.cmd150] DEBUG Exit code: 0
2022-01-15T14:56:58+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['ipa', 'automember-add-condition', '--inclusive-regex=^uid=miles', '--key=manager', '--type=hostgroup', '03automemb_hostgroup']
2022-01-15T14:56:58+0000 [pytest_multihost.host.Host.master.cmd151] DEBUG RUN ['ipa', 'automember-add-condition', '--inclusive-regex=^uid=miles', '--key=manager', '--type=hostgroup', '03automemb_hostgroup']
2022-01-15T14:56:58+0000 [pytest_multihost.host.Host.master.cmd151] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:56:58+0000 [pytest_multihost.host.Host.master.cmd151] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd151] DEBUG --------------------------------------------
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd151] DEBUG Added condition(s) to "03automemb_hostgroup"
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd151] DEBUG --------------------------------------------
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd151] DEBUG   Automember Rule: 03automemb_hostgroup
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd151] DEBUG   Description: testing
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd151] DEBUG   Inclusive Regex: manager=^uid=miles
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd151] DEBUG ----------------------------
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd151] DEBUG Number of conditions added 1
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd151] DEBUG ----------------------------
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd151] DEBUG Exit code: 0
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['kinit', 'admin']
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd152] DEBUG RUN ['kinit', 'admin']
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd152] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd152] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd152] DEBUG Password for admin: 
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd152] DEBUG Exit code: 0
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['ipa', 'automember-show', '--type=hostgroup', '03automemb_hostgroup']
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd153] DEBUG RUN ['ipa', 'automember-show', '--type=hostgroup', '03automemb_hostgroup']
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd153] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:56:59+0000 [pytest_multihost.host.Host.master.cmd153] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.master.cmd153] DEBUG   Automember Rule: 03automemb_hostgroup
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.master.cmd153] DEBUG   Description: testing
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.master.cmd153] DEBUG   Inclusive Regex: manager=^uid=miles
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.master.cmd153] DEBUG Exit code: 0
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['kdestroy', '-A']
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.master.cmd154] DEBUG RUN ['kdestroy', '-A']
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.master.cmd154] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.master.cmd154] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.master.cmd154] DEBUG Exit code: 0
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.ansible.OpenSSHTransport] INFO PUT inventory/automember.hosts
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.ansible.cmd84] DEBUG RUN ['tee', 'inventory/automember.hosts']
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.ansible.cmd84] DEBUG Exit code: 0
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.ansible.OpenSSHTransport] INFO PUT automember_module.yml
2022-01-15T14:57:00+0000 [pytest_multihost.host.Host.ansible.cmd85] DEBUG RUN ['tee', 'automember_module.yml']
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd85] DEBUG Exit code: 0
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.OpenSSHTransport] INFO RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/automember.hosts', 'automember_module.yml']
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/automember.hosts', 'automember_module.yml']
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG ansible-playbook [core 2.12.1]
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG   config file = /etc/ansible/ansible.cfg
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG   configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG   ansible python module location = /usr/lib/python3.9/site-packages/ansible
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG   ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG   executable location = /usr/bin/ansible-playbook
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG   python version = 3.9.9 (main, Nov 22 2021, 00:00:00) [GCC 11.2.1 20211019 (Red Hat 11.2.1-6)]
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG   jinja version = 2.11.3
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG   libyaml = True
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG Using /etc/ansible/ansible.cfg as config file
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG Skipping callback 'default', as we already have a stdout callback.
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG Skipping callback 'minimal', as we already have a stdout callback.
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG Skipping callback 'oneline', as we already have a stdout callback.
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG 
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG PLAYBOOK: automember_module.yml ************************************************
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG 1 plays in automember_module.yml
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG 
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG PLAY [Playbook to ensure a host group automember rule is updated with discreption without changing exiting inclusive, exclusive parameters.] ***
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG 
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG TASK [Gathering Facts] *********************************************************
2022-01-15T14:57:01+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG task path: /root/automember_module.yml:2
2022-01-15T14:57:03+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG ok: [master.ipadomain.test]
2022-01-15T14:57:03+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG META: ran handlers
2022-01-15T14:57:03+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG 
2022-01-15T14:57:03+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG TASK [ipaautomember] ***********************************************************
2022-01-15T14:57:03+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG task path: /root/automember_module.yml:7
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG changed: [master.ipadomain.test] => {"changed": true}
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG META: ran handlers
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG META: ran handlers
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG 
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG PLAY RECAP *********************************************************************
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG master.ipadomain.test      : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG 
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.ansible.cmd86] DEBUG Exit code: 0
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['kinit', 'admin']
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.master.cmd155] DEBUG RUN ['kinit', 'admin']
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.master.cmd155] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.master.cmd155] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.master.cmd155] DEBUG Password for admin: 
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.master.cmd155] DEBUG Exit code: 0
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['ipa', 'automember-show', '--type=hostgroup', '03automemb_hostgroup']
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.master.cmd156] DEBUG RUN ['ipa', 'automember-show', '--type=hostgroup', '03automemb_hostgroup']
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.master.cmd156] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:57:06+0000 [pytest_multihost.host.Host.master.cmd156] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.cmd156] DEBUG   Automember Rule: 03automemb_hostgroup
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.cmd156] DEBUG   Description: Automember rule 1976922
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.cmd156] DEBUG   Inclusive Regex: manager=^uid=miles
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.cmd156] DEBUG Exit code: 0
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['kdestroy', '-A']
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.cmd157] DEBUG RUN ['kdestroy', '-A']
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.cmd157] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.cmd157] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.cmd157] DEBUG Exit code: 0
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['kinit', 'admin']
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.cmd158] DEBUG RUN ['kinit', 'admin']
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.cmd158] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.cmd158] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:57:07+0000 [pytest_multihost.host.Host.master.cmd158] DEBUG Password for admin: 
2022-01-15T14:57:08+0000 [pytest_multihost.host.Host.master.cmd158] DEBUG Exit code: 0
2022-01-15T14:57:08+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['ipa', 'automember-default-group-show', '--type=group']
2022-01-15T14:57:08+0000 [pytest_multihost.host.Host.master.cmd159] DEBUG RUN ['ipa', 'automember-default-group-show', '--type=group']

Comment 11 errata-xmlrpc 2022-05-17 12:47:27 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 (new packages: ansible-freeipa), 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/RHBA-2022:2395


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