diff --git a/plugins/modules/ipaselfservice.py b/plugins/modules/ipaselfservice.py index 81b4461ce87ef6f627fc13defa42eef8280c68c3..53bd5b3b6a626763f183c173cc7945395decce41 100644 --- a/plugins/modules/ipaselfservice.py +++ b/plugins/modules/ipaselfservice.py @@ -278,17 +278,7 @@ def main(): # Execute commands - for name, command, args in commands: - try: - result = ansible_module.ipa_command(command, name, args) - if "completed" in result: - if result["completed"] > 0: - changed = True - else: - changed = True - except Exception as e: - ansible_module.fail_json(msg="%s: %s: %s" % (command, name, - str(e))) + changed = ansible_module.execute_ipa_commands(commands) # Done