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.
DescriptionVarun Mylaraiah
2020-11-02 11:00:34 UTC
Cloned: https://github.com/freeipa/ansible-freeipa/issues/411
There is no error message while adding non-existing members(user/group/host/host group/service) in the role and also it removed existing member as well
[root@master ~]# ipa role-show newrole
Role name: newrole
Member users: vuser01
Member groups: vgroup01
Member hosts: teshoat.ipadomain.test
Member host-groups: hostgroup01
Privileges: User Administrators, Group Administrators, Host Administrators, DNS Administrators, DNS Servers
Member services: newhost1/master.ipadomain.test
[root@ansible ~]# cat newrole2.yaml
---
- name: "nonexisting user as a member"
hosts: ipaserver
tasks:
- iparole:
ipaadmin_password: <password>
name: newrole
user: nouser
action: member
[root@ansible ~]# ansible-playbook -vv -i inventory/server.hosts newrole2.yaml
ansible-playbook 2.9.11
config file = /root/ansible.cfg
configured module search path = ['/root/ansible-freeipa/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.8/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 3.8.5 (default, Aug 12 2020, 00:00:00) [GCC 10.2.1 20200723 (Red Hat 10.2.1-1)]
Using /root/ansible.cfg as config file
PLAYBOOK: newrole2.yaml **********************************************************************************************
1 plays in newrole2.yaml
PLAY [nonexisting user as a member] **********************************************************************************
TASK [Gathering Facts] ***********************************************************************************************
task path: /root/newrole2.yaml:2
[DEPRECATION WARNING]: Distribution fedora 32 on host master.ipadomain.test should use /usr/bin/python3, but is using
/usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to
using the discovered platform python for this host. See
https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. This
feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False
in ansible.cfg.
ok: [master.ipadomain.test]
META: ran handlers
TASK [iparole] *******************************************************************************************************
task path: /root/newrole2.yaml:6
changed: [master.ipadomain.test] => {"changed": true}
META: ran handlers
META: ran handlers
PLAY RECAP ***********************************************************************************************************
master.ipadomain.test : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored