mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-07 05:43:26 +00:00
FreeIPABaseModule: Add support for check_mode.
All ansible-freeipa modules should support 'check_mode: yes', but the support for creating modules with this was absent in the base class. This patch adds such support, to use it, 'supports_check_mode=True' must be passed to the constructor when creating the module object.
This commit is contained in:
@@ -786,6 +786,10 @@ else:
|
||||
|
||||
def _run_ipa_commands(self):
|
||||
"""Execute commands in self.ipa_commands."""
|
||||
if self.check_mode:
|
||||
self.changed = len(self.ipa_commands) > 0
|
||||
return
|
||||
|
||||
result = None
|
||||
|
||||
for name, command, args in self.ipa_commands:
|
||||
|
||||
Reference in New Issue
Block a user