forked from freeipa/ansible-freeipa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ipasudorule: Allow setting groups for runasuser.
On IPA CLI sudorule-add/del-runasuser accept 'group' as a parameter, and this option was missing in ansible-freeipa ipasudorule module. This patch adds a new parameter 'runasuser_group' to allow setting Groups of RunAs Users, as allowed by CLI and WebUI. New example playboks can be found at: playbooks/sudorule/ensure-sudorule-runasusesr-group-is-absent.yml playbooks/sudorule/ensure-sudorule-runasusesr-group-is-present.yml
- Loading branch information
Showing
5 changed files
with
140 additions
and
8 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
14 changes: 14 additions & 0 deletions
14
playbooks/sudorule/ensure-sudorule-runasusesr-group-is-absent.yml
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,14 @@ | ||
--- | ||
- name: Playbook no manage sudurule member | ||
hosts: ipaserver | ||
become: no | ||
gather_facts: no | ||
|
||
tasks: | ||
- name: Ensure sudorule 'runasuser' do not have 'ipasuers' group as runas users. | ||
ipasudorule: | ||
ipaadmin_password: SomeADMINpassword | ||
name: testrule1 | ||
runasuser_group: ipausers | ||
action: member | ||
state: absent |
13 changes: 13 additions & 0 deletions
13
playbooks/sudorule/ensure-sudorule-runasusesr-group-is-present.yml
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,13 @@ | ||
--- | ||
- name: Playbook no manage sudurule member | ||
hosts: ipaserver | ||
become: no | ||
gather_facts: no | ||
|
||
tasks: | ||
- name: Ensure sudorule 'runasuser' has 'ipasuers' group as runas users. | ||
ipasudorule: | ||
ipaadmin_password: SomeADMINpassword | ||
name: testrule1 | ||
runasuser_group: ipausers | ||
action: member |
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