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 1976923 - [ansible-freeipa] Required better error message for updating in/ex/clusive regex to non-existent automember rule
Summary: [ansible-freeipa] Required better error message for updating in/ex/clusive re...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ansible-freeipa
Version: 8.5
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Thomas Woerner
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks: 1981711
TreeView+ depends on / blocked
 
Reported: 2021-06-28 15:00 UTC by Varun Mylaraiah
Modified: 2021-11-10 01:10 UTC (History)
1 user (show)

Fixed In Version: ansible-freeipa-0.3.7-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1981711 (view as bug list)
Environment:
Last Closed: 2021-11-09 18:45:36 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-7295 0 None None None 2021-11-09 18:51:39 UTC
Red Hat Product Errata RHBA-2021:4268 0 None None None 2021-11-09 18:45:49 UTC

Description Varun Mylaraiah 2021-06-28 15:00:50 UTC
Description of problem:
Required better error message for updating in/ex/clusive regex to non-existent automember rule

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


Steps to Reproduce:
[root@ansible ~]# cat automember2.yaml
---
- name: Playbook to ensure not able to update exclusive regex to non-existent automember group rule.
  hosts: ipaserver
  become: yes
  
  tasks:
  - ipaautomember:      
      ipaadmin_principal: admin
      ipaadmin_password:<xxxxxxx>
      name: noautomemb_usergroup
      exclusive:
        - key: cn
          expression: '^uid=clint'
      action: member
      automember_type: group


[root@ansible ~]# ansible-playbook -vv -i inventory/automember.hosts automember2.yaml
PLAYBOOK: automember2.yaml ************************************************************************************************
1 plays in automember2.yaml

PLAY [Playbook to ensure not able to update exclusive regex to non-existent automember group rule.] ***********************

TASK [Gathering Facts] ****************************************************************************************************
task path: /root/automember2.yaml:2
ok: [master.ipadomain.test]
META: ran handlers

TASK [ipaautomember] ******************************************************************************************************
task path: /root/automember2.yaml:7
fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "msg": "No service 'noautomemb_usergroup'"}

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": "No service 'noautomemb_usergroup'"}

Expected results:
Auto member rule: onautomemb_usergroup not found

Additional info:
[root@master ~]# ipa automember-add-condition noautomemb_usergroup --key=cn --exclusive-regex=^uid=clint --type=group
ipa: ERROR: Auto member rule: noautomemb_usergroup not found

Comment 1 Thomas Woerner 2021-07-08 13:30:20 UTC
Here is the upstream PR: https://github.com/freeipa/ansible-freeipa/pull/584

It has been merged.

Comment 6 anuja 2021-07-30 12:21:48 UTC
Verified using nightly:
(A) test-result.txt.gz
2021-07-30T12:07:03 ============================= test session starts ==============================
2021-07-30T12:15:41 ansible_freeipa_tests/automember/test_automember.py::TestAutomember::test_automember_nonexisting_group_rule_update_exclusive_regex PASSED [ 57%]

(B) runner.log 
2021-07-30T12:06:58 ok: [ansible.runner.test] => (item=ansible-freeipa) => 
2021-07-30T12:06:58   msg:
2021-07-30T12:06:58   - arch: noarch
2021-07-30T12:06:58     epoch: null
2021-07-30T12:06:58     name: ansible-freeipa
2021-07-30T12:06:58     release: 1.el8
2021-07-30T12:06:58     source: rpm
2021-07-30T12:06:58     version: 0.3.8

Comment 9 errata-xmlrpc 2021-11-09 18:45:36 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/RHBA-2021:4268


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