mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-28 18:34:44 +00:00
Enabled Ansible check_mode
Added code to the ipa* plugins to support Ansible's check_mode, by means of a clean exit before the execution of the actual list of commands that would otherwise create/update/delete IPA servers and/or its resources.
This commit is contained in:
@@ -380,6 +380,12 @@ def main():
|
||||
[name, 'dnsforwardzone_remove_permission', {}]
|
||||
)
|
||||
|
||||
# Check mode exit
|
||||
if ansible_module.check_mode:
|
||||
ansible_module.exit_json(changed=len(commands) > 0,
|
||||
**exit_args)
|
||||
|
||||
# Execute commands
|
||||
for name, command, args in commands:
|
||||
api_command(ansible_module, command, name, args)
|
||||
changed = True
|
||||
|
||||
Reference in New Issue
Block a user