-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #487 from rjeffman/ipagroup_add_idoverrideuser
Add support for managing idoverrideusers in ipagroup.
- Loading branch information
Showing
3 changed files
with
144 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
--- | ||
- name: Test group | ||
hosts: ipaserver | ||
become: yes | ||
gather_facts: yes | ||
|
||
vars: | ||
ad_user: "{{ test_ad_user | default('AD\\aduser') }}" | ||
ad_domain: "{{ test_ad_domain | default('ad.ipa.test') }}" | ||
|
||
tasks: | ||
- include_tasks: ../env_freeipa_facts.yml | ||
|
||
- block: | ||
- name: Create idoverrideuser. | ||
shell: | | ||
kinit -c idoverride_cache admin <<< SomeADMINpassword | ||
ipa idoverrideuser-add "Default Trust View" {{ ad_user }} | ||
kdestroy -A -q -c idoverride_cache | ||
- name: Remove testing groups. | ||
ipagroup: | ||
ipaadmin_password: SomeADMINpassword | ||
name: | ||
- idovergroup | ||
state: absent | ||
|
||
- name: Add group with idoverrideuser. | ||
ipagroup: | ||
ipaadmin_password: SomeADMINpassword | ||
name: idovergroup | ||
idoverrideuser: "{{ ad_user }}" | ||
register: result | ||
failed_when: result.failed or not result.changed | ||
|
||
- name: Add group with idoverrideuser, again. | ||
ipagroup: | ||
ipaadmin_password: SomeADMINpassword | ||
name: idovergroup | ||
idoverrideuser: "{{ ad_user }}" | ||
register: result | ||
failed_when: result.failed or result.changed | ||
|
||
- name: Remove idoverrideuser member. | ||
ipagroup: | ||
ipaadmin_password: SomeADMINpassword | ||
name: idovergroup | ||
idoverrideuser: "{{ ad_user }}" | ||
action: member | ||
state: absent | ||
register: result | ||
failed_when: result.failed or not result.changed | ||
|
||
- name: Remove idoverrideuser member, again. | ||
ipagroup: | ||
ipaadmin_password: SomeADMINpassword | ||
name: idovergroup | ||
idoverrideuser: "{{ ad_user }}" | ||
action: member | ||
state: absent | ||
register: result | ||
failed_when: result.failed or result.changed | ||
|
||
- name: Add idoverrideuser member. | ||
ipagroup: | ||
ipaadmin_password: SomeADMINpassword | ||
name: idovergroup | ||
idoverrideuser: "{{ ad_user }}" | ||
action: member | ||
register: result | ||
failed_when: result.failed or not result.changed | ||
|
||
- name: Add idoverrideuser member, again. | ||
ipagroup: | ||
ipaadmin_password: SomeADMINpassword | ||
name: idovergroup | ||
idoverrideuser: "{{ ad_user }}" | ||
action: member | ||
register: result | ||
failed_when: result.failed or result.changed | ||
|
||
- name: Cleanup idoverrideuser member. | ||
ipagroup: | ||
ipaadmin_password: SomeADMINpassword | ||
name: idovergroup | ||
idoverrideuser: "{{ ad_user }}" | ||
state: absent | ||
|
||
- name: Remove testing groups. | ||
ipagroup: | ||
ipaadmin_password: SomeADMINpassword | ||
name: | ||
- idovergroup | ||
state: absent | ||
|
||
always: | ||
- name: Remove idoverrideuser. | ||
shell: | | ||
kinit -c idoverride_cache admin <<< SomeADMINpassword | ||
ipa idoverrideuser-del "Default Trust View" {{ ad_user }} | ||
kdestroy -A -q -c idoverride_cache | ||
when: | ||
|
||
when: ipa_version is version("4.8.7", ">=") and trust_test_is_supported | default(false) |