mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-07 05:43:26 +00:00
ipasudocmdgroup: Remove unused sudocmdgroup.
Remove an unused attribute that has no parallel in IPA API.
This commit is contained in:
@@ -50,10 +50,6 @@ options:
|
||||
description: Suppress processing of membership attributes
|
||||
required: false
|
||||
type: bool
|
||||
sudocmdgroup:
|
||||
description: List of sudocmdgroup names assigned to this sudocmdgroup.
|
||||
required: false
|
||||
type: list
|
||||
sudocmd:
|
||||
description: List of sudocmds assigned to this sudocmdgroup.
|
||||
required: false
|
||||
@@ -157,7 +153,6 @@ def main():
|
||||
# present
|
||||
description=dict(type="str", default=None),
|
||||
nomembers=dict(required=False, type='bool', default=None),
|
||||
sudocmdgroup=dict(required=False, type='list', default=None),
|
||||
sudocmd=dict(required=False, type='list', default=None),
|
||||
action=dict(type="str", default="sudocmdgroup",
|
||||
choices=["member", "sudocmdgroup"]),
|
||||
@@ -180,7 +175,6 @@ def main():
|
||||
# present
|
||||
description = ansible_module.params.get("description")
|
||||
nomembers = ansible_module.params.get("nomembers")
|
||||
sudocmdgroup = ansible_module.params.get("sudocmdgroup")
|
||||
sudocmd = ansible_module.params.get("sudocmd")
|
||||
action = ansible_module.params.get("action")
|
||||
# state
|
||||
|
||||
@@ -75,17 +75,12 @@
|
||||
failed_when: result.changed
|
||||
|
||||
- name: Verify sudocmdgroup creation with sudocmds
|
||||
block:
|
||||
- name: Get Kerberos ticket for `admin`.
|
||||
shell: echo SomeADMINpassword | kinit -c test_sudocmdgroup_krb5ccname admin
|
||||
|
||||
- name: Check sudocmdgroup-show output.
|
||||
shell: ipa sudocmdgroup-show network --all
|
||||
register: result
|
||||
failed_when: result.failed or not("/usr/sbin/ifconfig" in result.stdout and "/usr/sbin/iwlist" in result.stdout)
|
||||
|
||||
- name: Destroy Kerberos tickets.
|
||||
shell: kdestroy -A -q -c test_sudocmdgroup_krb5ccname
|
||||
shell: |
|
||||
echo SomeADMINpassword | kinit -c verify_sudocmdgroup admin
|
||||
KRB5CCNAME="verify_sudocmdgroup" ipa sudocmdgroup-show network --all
|
||||
kdestroy -A -q -c verify_sudocmdgroup
|
||||
register: result
|
||||
failed_when: result.failed or not("/usr/sbin/ifconfig" in result.stdout and "/usr/sbin/iwlist" in result.stdout)
|
||||
|
||||
- name: Ensure sudocmdgroup, with sudocmds, is absent
|
||||
ipasudocmdgroup:
|
||||
|
||||
Reference in New Issue
Block a user