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:
Eric Nothen
2021-01-05 14:33:39 +01:00
parent 8d9e794ddf
commit 7bbb401b9b
27 changed files with 107 additions and 4 deletions

View File

@@ -428,7 +428,8 @@ def main():
if params \
and not compare_args_ipa(ansible_module, params, res_show):
changed = True
api_command_no_name(ansible_module, "config_mod", params)
if not ansible_module.check_mode:
api_command_no_name(ansible_module, "config_mod", params)
else:
rawresult = api_command_no_name(ansible_module, "config_show", {})