Bug 1922060

Summary: Sample playbook included for selfservice module is incorrect
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:
: 1973166 (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: 1973166    

Description Sudhir Menon 2021-01-29 06:54:07 UTC
Description of problem: Sample playbook included for selfservice module is incorrect.

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

How reproducible:Always

Steps to Reproduce:
#ansible-playbook -i inventory/testday.hosts -vv /usr/share/doc/ansible-freeipa/ /playbooks/selfservice/selfservice-present.yml 

Actual results:
1. Playbook included in /usr/share/doc/ansible-freeipa/playbooks/selfservice/selfservice-present.yml is that of delegation

---
- name: Delegation present
  hosts: ipaserver
  become: true

  tasks:
  - name: Ensure delegation "basic manager attributes" is present
    ipadelegation:
      ipaadmin_password: SomeADMINpassword
      name: "basic manager attributes"
      permission: read
      attribute:
      - businesscategory


2. https://github.com/freeipa/ansible-freeipa/blob/master/playbooks/selfservice/selfservice-present.yml
fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "msg": "delegation_add: basic manager attributes: 'memberof' is required"}

Expected results:
The sample playbook selfservice-present.yml is basically a delegation module playbook which needs to be corrected.

Additional info:

Comment 1 Rafael Jeffman 2021-02-01 21:28:11 UTC
There is an upstream PR to fix this issue: https://github.com/freeipa/ansible-freeipa/pull/505

Comment 2 Rafael Jeffman 2021-03-24 15:18:40 UTC
Upstream PR has been merged.

Comment 8 Varun Mylaraiah 2021-06-21 08:02:19 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)

[root@ansible ~]# cat /usr/share/doc/ansible-freeipa/playbooks/selfservice/selfservice-present.yml 
---
- name: Selfservice present
  hosts: ipaserver
  become: true

  tasks:
  - name: Ensure selfservice "basic manager attributes" is present
    ipaselfservice:
      ipaadmin_password: SomeADMINpassword
      name: "basic manager attributes"
      permission: read
      attribute:
      - businesscategory

[root@ansible ~]# cat /usr/share/doc/ansible-freeipa/playbooks/selfservice/selfservice-member-present.yml 
---
- name: Selfservice member present
  hosts: ipaserver
  become: true

  tasks:
  - name: Ensure selfservice "basic manager attributes" member attribute departmentnumber is present
    ipaselfservice:
      ipaadmin_password: SomeADMINpassword
      name: "basic manager attributes"
      attribute:
      - departmentnumber
      action: member

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