diff --git a/plugins/modules/ipaserver.py b/plugins/modules/ipaserver.py
index c1bfe119af8dcbe382aa9b27678c3db9edf6d525..509e3ca16185f92da26018c0aa407e6cbff788bd 100644
--- a/plugins/modules/ipaserver.py
+++ b/plugins/modules/ipaserver.py
@@ -391,17 +391,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