mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-11 11:15:55 +00:00
Use netgroup_find instead of netgroup_show to workaround IPA bug.
Patch fixes https://bugzilla.redhat.com/show_bug.cgi?id=2144724 which depends on https://pagure.io/freeipa/issue/9284. Add comment why replacing `netgroup_show` with `netgroup_find`. Signed-off-by: Denis Karpelevich <dkarpele@redhat.com>
This commit is contained in:
@@ -17,6 +17,14 @@
|
||||
- my_netgroup3
|
||||
state: absent
|
||||
|
||||
- name: Ensure hostgroup is absent
|
||||
ipahostgroup:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
||||
name:
|
||||
- my_hostgroup1
|
||||
state: absent
|
||||
|
||||
# CREATE TEST ITEMS
|
||||
- name: Get Domain from server name
|
||||
ansible.builtin.set_fact:
|
||||
@@ -35,6 +43,12 @@
|
||||
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
||||
name: my_netgroup3
|
||||
|
||||
- name: Ensure hostgroup my_hostgroup1 is present
|
||||
ipahostgroup:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
||||
name: my_hostgroup1
|
||||
|
||||
# TESTS
|
||||
|
||||
- name: Ensure netgroup my_netgroup1 is present
|
||||
@@ -115,7 +129,7 @@
|
||||
register: result
|
||||
failed_when: result.changed or result.failed
|
||||
|
||||
# netgroup and hostgroup with the same name are deprecated
|
||||
# netgroup and hostgroup with the same name are deprecated (check hostgroup)
|
||||
- name: Ensure hostgroup my_netgroup2 isn't present
|
||||
ipahostgroup:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
@@ -125,6 +139,16 @@
|
||||
failed_when: result.changed or not result.failed or
|
||||
"Hostgroups and netgroups share a common namespace" not in result.msg
|
||||
|
||||
# netgroup and hostgroup with the same name are deprecated (check netgroup)
|
||||
- name: Ensure netgroup my_hostgroup1 isn't present
|
||||
ipanetgroup:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
||||
name: my_hostgroup1
|
||||
register: result
|
||||
failed_when: result.changed or not result.failed or
|
||||
"Hostgroups and netgroups share a common namespace" not in result.msg
|
||||
|
||||
- name: Ensure netgroups my_netgroup2, my_netgroup3 are absent
|
||||
ipanetgroup:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
@@ -147,3 +171,11 @@
|
||||
- my_netgroup2
|
||||
- my_netgroup3
|
||||
state: absent
|
||||
|
||||
- name: Ensure hostgroups are absent
|
||||
ipahostgroup:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
||||
name:
|
||||
- my_hostgroup1
|
||||
state: absent
|
||||
|
||||
Reference in New Issue
Block a user