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.

Bug 2021954

Summary: [ansible-freeipa] automember rebuild is missing from the automember module.
Product: Red Hat Enterprise Linux 9 Reporter: Varun Mylaraiah <mvarun>
Component: ansible-freeipaAssignee: Thomas Woerner <twoerner>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: medium Docs Contact:
Priority: high    
Version: 9.0CC: ipa-qe, rjeffman, twoerner
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ansible-freeipa-1.5.3-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1999915 Environment:
Last Closed: 2022-05-17 12:47:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1999915    
Bug Blocks:    

Description Varun Mylaraiah 2021-11-10 13:24:40 UTC
+++ This bug was initially created as a clone of Bug #1999915 +++

Description of problem:
In the Ansible-freeipa Automember module, There is no option to rebuild automember

Version-Release number of selected component (if applicable):
ansible-freeipa-0.3.8-1

Expected results:
CLI option.
# ipa automember-rebuild --help
Usage: ipa [global-options] automember-rebuild [options]

Rebuild auto membership.
Options:
--type=['group', 'hostgroup'] Grouping to which the rule applies
--users=STR           Rebuild membership for specified users
--hosts=STR           Rebuild membership for specified hosts
--no-wait             Don't wait for rebuilding membership

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

2022-01-15T14:58:11 ansible_freeipa_tests/automember/test_automember.py::TestAutomember::test_automember_group_rebuilt_particular_users PASSED [ 87%]
2022-01-15T14:58:23 ansible_freeipa_tests/automember/test_automember.py::TestAutomember::test_automember_group_rebuilt_all_users PASSED [ 89%]
2022-01-15T14:58:37 ansible_freeipa_tests/automember/test_automember.py::TestAutomember::test_automember_hostgroup_rebuilt_particular_host PASSED [ 92%]
2022-01-15T14:58:50 ansible_freeipa_tests/automember/test_automember.py::TestAutomember::test_automember_hostgroup_rebuilt_all_hosts PASSED [ 94%]

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

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


2022-01-15T14:58:37+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['ipa', 'hostgroup-add', 'newwebserver']
2022-01-15T14:58:37+0000 [pytest_multihost.host.Host.master.cmd224] DEBUG RUN ['ipa', 'hostgroup-add', 'newwebserver']
2022-01-15T14:58:37+0000 [pytest_multihost.host.Host.master.cmd224] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:58:37+0000 [pytest_multihost.host.Host.master.cmd224] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:58:39+0000 [pytest_multihost.host.Host.master.cmd224] DEBUG ------------------------------
2022-01-15T14:58:39+0000 [pytest_multihost.host.Host.master.cmd224] DEBUG Added hostgroup "newwebserver"
2022-01-15T14:58:39+0000 [pytest_multihost.host.Host.master.cmd224] DEBUG ------------------------------
2022-01-15T14:58:39+0000 [pytest_multihost.host.Host.master.cmd224] DEBUG   Host-group: newwebserver
2022-01-15T14:58:39+0000 [pytest_multihost.host.Host.master.cmd224] DEBUG Exit code: 0
2022-01-15T14:58:39+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['ipa', 'automember-add', '--type=hostgroup', 'newwebserver']
2022-01-15T14:58:39+0000 [pytest_multihost.host.Host.master.cmd225] DEBUG RUN ['ipa', 'automember-add', '--type=hostgroup', 'newwebserver']
2022-01-15T14:58:39+0000 [pytest_multihost.host.Host.master.cmd225] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:58:39+0000 [pytest_multihost.host.Host.master.cmd225] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:58:40+0000 [pytest_multihost.host.Host.master.cmd225] DEBUG ------------------------------------
2022-01-15T14:58:40+0000 [pytest_multihost.host.Host.master.cmd225] DEBUG Added automember rule "newwebserver"
2022-01-15T14:58:40+0000 [pytest_multihost.host.Host.master.cmd225] DEBUG ------------------------------------
2022-01-15T14:58:40+0000 [pytest_multihost.host.Host.master.cmd225] DEBUG   Automember Rule: newwebserver
2022-01-15T14:58:40+0000 [pytest_multihost.host.Host.master.cmd225] DEBUG Exit code: 0
2022-01-15T14:58:40+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['ipa', 'automember-add-condition', '--inclusive-regex=^newweb[1-9]+.example.test', '--key=fqdn', '--type=hostgroup', 'newwebserver']
2022-01-15T14:58:40+0000 [pytest_multihost.host.Host.master.cmd226] DEBUG RUN ['ipa', 'automember-add-condition', '--inclusive-regex=^newweb[1-9]+.example.test', '--key=fqdn', '--type=hostgroup', 'newwebserver']
2022-01-15T14:58:40+0000 [pytest_multihost.host.Host.master.cmd226] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:58:40+0000 [pytest_multihost.host.Host.master.cmd226] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd226] DEBUG ------------------------------------
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd226] DEBUG Added condition(s) to "newwebserver"
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd226] DEBUG ------------------------------------
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd226] DEBUG   Automember Rule: newwebserver
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd226] DEBUG   Inclusive Regex: fqdn=^newweb[1-9]+.example.test
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd226] DEBUG ----------------------------
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd226] DEBUG Number of conditions added 1
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd226] DEBUG ----------------------------
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd226] DEBUG Exit code: 0
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['kinit', 'admin']
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd227] DEBUG RUN ['kinit', 'admin']
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd227] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd227] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd227] DEBUG Password for admin: 
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd227] DEBUG Exit code: 0
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['ipa', 'hostgroup-show', 'newwebserver']
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd228] DEBUG RUN ['ipa', 'hostgroup-show', 'newwebserver']
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd228] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:58:41+0000 [pytest_multihost.host.Host.master.cmd228] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.master.cmd228] DEBUG   Host-group: newwebserver
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.master.cmd228] DEBUG Exit code: 0
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['kdestroy', '-A']
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.master.cmd229] DEBUG RUN ['kdestroy', '-A']
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.master.cmd229] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.master.cmd229] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.master.cmd229] DEBUG Exit code: 0
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.ansible.OpenSSHTransport] INFO PUT inventory/automember.hosts
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.ansible.cmd114] DEBUG RUN ['tee', 'inventory/automember.hosts']
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.ansible.cmd114] DEBUG Exit code: 0
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.ansible.OpenSSHTransport] INFO PUT automember_module.yml
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.ansible.cmd115] DEBUG RUN ['tee', 'automember_module.yml']
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.ansible.cmd115] DEBUG Exit code: 0
2022-01-15T14:58:42+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:58:42+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/automember.hosts', 'automember_module.yml']
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:58:42+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG ansible-playbook [core 2.12.1]
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG   config file = /etc/ansible/ansible.cfg
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG   configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG   ansible python module location = /usr/lib/python3.9/site-packages/ansible
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG   ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG   executable location = /usr/bin/ansible-playbook
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] 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:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG   jinja version = 2.11.3
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG   libyaml = True
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG Using /etc/ansible/ansible.cfg as config file
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG Skipping callback 'default', as we already have a stdout callback.
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG Skipping callback 'minimal', as we already have a stdout callback.
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG Skipping callback 'oneline', as we already have a stdout callback.
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG 
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG PLAYBOOK: automember_module.yml ************************************************
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG 1 plays in automember_module.yml
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG 
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG PLAY [Playbook to ensure a host group membership for all hosts has been rebuilt] ***
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG 
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG TASK [Gathering Facts] *********************************************************
2022-01-15T14:58:43+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG task path: /root/automember_module.yml:2
2022-01-15T14:58:44+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG ok: [master.ipadomain.test]
2022-01-15T14:58:44+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG META: ran handlers
2022-01-15T14:58:44+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG 
2022-01-15T14:58:44+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG TASK [ipaautomember] ***********************************************************
2022-01-15T14:58:44+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG task path: /root/automember_module.yml:7
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG changed: [master.ipadomain.test] => {"changed": true}
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG META: ran handlers
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG META: ran handlers
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG 
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG PLAY RECAP *********************************************************************
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG master.ipadomain.test      : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG 
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.ansible.cmd116] DEBUG Exit code: 0
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['kinit', 'admin']
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.master.cmd230] DEBUG RUN ['kinit', 'admin']
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.master.cmd230] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.master.cmd230] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.master.cmd230] DEBUG Password for admin: 
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.master.cmd230] DEBUG Exit code: 0
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.master.OpenSSHTransport] INFO RUN ['ipa', 'hostgroup-show', 'newwebserver']
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.master.cmd231] DEBUG RUN ['ipa', 'hostgroup-show', 'newwebserver']
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.master.cmd231] DEBUG bash: line 1: cd: /root/multihost_tests: No such file or directory
2022-01-15T14:58:49+0000 [pytest_multihost.host.Host.master.cmd231] DEBUG bash: line 2: /root/multihost_tests/env.sh: No such file or directory
2022-01-15T14:58:50+0000 [pytest_multihost.host.Host.master.cmd231] DEBUG   Host-group: newwebserver
2022-01-15T14:58:50+0000 [pytest_multihost.host.Host.master.cmd231] DEBUG   Member hosts: newweb3.example.test, newweb2.example.test
2022-01-15T14:58:50+0000 [pytest_multihost.host.Host.master.cmd231] DEBUG Exit code: 0

Comment 9 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