Bug 1921654

Summary: Remove unsupported parameter for (ipapermission) module: perm_rights from permission-present.yml
Product: Red Hat Enterprise Linux 8 Reporter: Sudhir Menon <sumenon>
Component: ansible-freeipaAssignee: Rafael Jeffman <rjeffman>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.4CC: mvarun, ndehadra, rjeffman, twoerner
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ansible-freeipa-0.3.6-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1973167 (view as bug list) Environment:
Last Closed: 2021-11-09 18:45:36 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:    
Bug Blocks: 1973167    

Description Sudhir Menon 2021-01-28 11:53:03 UTC
Description of problem: Remove unsupported parameter for (ipapermission) module: perm_rights from permission-present.yml


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

How reproducible:
Always

Steps to Reproduce:
#[root@ansible ~]# ansible-playbook -i inventory/master.hosts -vv /usr/share/doc/ansible-freeipa/playbooks/permission/permission-present.yml


Actual results:
fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (ipapermission) module: perm_rights Supported parameters include: action, attrs, bindtype, extra_target_filter, ipaadmin_password, ipaadmin_principal, memberof, name, no_members, object_type, rawfilter, rename, right, state, subtree, target, targetfrom, targetgroup, targetto"}

Expected results:
Need to include supported parameters in the sample playbook i.e 'ipapermright', otherwise the permission-present.yml will always fail.

Additional info:

Comment 1 Sudhir Menon 2021-01-28 12:01:07 UTC
---
- name: Permission present example
  hosts: ipaserver
  become: true

  tasks:
  - name: Ensure permission TestPerm1 is present
    ipapermission:
      name: TestPerm1
      object_type: host
      perm_rights: all

Comment 2 Rafael Jeffman 2021-02-01 21:08:40 UTC
There is an upstream PR to fix this issue: https://github.com/freeipa/ansible-freeipa/pull/504

Comment 3 Rafael Jeffman 2021-03-24 15:22:41 UTC
The upstream PR has been merged.

Comment 10 Varun Mylaraiah 2021-06-21 08:05:16 UTC
Verified:

ansible-freeipa-0.3.6-3.el8.noarch
ipa-server-4.9.3-1.module+el8.5.0+10565+ae980a94.x86_64

# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.5 Beta (Ootpa)

The correct sample playbook is available for permission-present.yml.
ipapermright|right is added in permission-present.yml

# cat /usr/share/doc/ansible-freeipa/playbooks/permission/permission-present.yml 
---
- name: Permission present example
  hosts: ipaserver
  become: true

  tasks:
  - name: Ensure permission is present
    ipapermission:
      ipaadmin_password: SomeADMINpassword
      name: TestPerm1
      object_type: host
      right: all

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