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 1976926 - [ansible-freeipa] Required correct error message for removing in/ex/clusive regex with an invalid key from automember rule
Summary: [ansible-freeipa] Required correct error message for removing in/ex/clusive r...
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: 1981713
TreeView+ depends on / blocked
 
Reported: 2021-06-28 15:02 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:
: 1981713 (view as bug list)
Environment:
Last Closed: 2021-11-09 18:45:36 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-7297 0 None None None 2021-11-09 18:51:51 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:02:13 UTC
Description of problem:
Required correct error message while removing in/ex/clusive regex with an invalid key from automember rule

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


Steps to Reproduce:
[root@ansible ~]# cat automember3_remove.yaml
---
- name: Playbook to ensure group automember is not able to remove with invalid exclusive regex key
  hosts: ipaserver
  become: yes
  
  tasks:
  - ipaautomember:      
      ipaadmin_principal: admin
      Ipaadmin_password: <xxxxxxxxx>
      name: 01automemb_usergroup
      exclusive:
        - key: tesykey
          expression: '^uid=clint'
      action: member
      automember_type: group
      state: absent


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

PLAY [Playbook to ensure group automember is not able to remove with invalid exclusive regex key] *************************

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

TASK [ipaautomember] ******************************************************************************************************
task path: /root/automember3_remove.yaml:7
fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "msg": "too many values to unpack (expected 2)"}

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": "too many values to unpack (expected 2)"}

Expected results:
tesykey is not a valid attribute.

Additional info:

Comment 1 Thomas Woerner 2021-07-08 19:44:21 UTC
Upstream PR: https://github.com/freeipa/ansible-freeipa/pull/590

Comment 2 Thomas Woerner 2021-07-12 12:24:47 UTC
The upstream PR has been merged.

Comment 3 Thomas Woerner 2021-07-13 13:12:56 UTC
Here is an additional PR to verify condition keys: https://github.com/freeipa/ansible-freeipa/pull/596

Comment 9 anuja 2021-07-30 12:23:25 UTC
Verified using nightly:
(A) test-result.txt.gz
2021-07-30T12:16:22 ansible_freeipa_tests/automember/test_automember.py::TestAutomember::test_automember_group_rule_remove_with_invalid_exclusive_regex_key PASSED [ 80%]

(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 12 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.