diff --git a/plugins/module_utils/ansible_freeipa_module.py b/plugins/module_utils/ansible_freeipa_module.py index 28f82e2378f5c05de1c2b0f9e793cd148e776045..4b884227fb2f26430a5e7095b6a3a8478032e3f5 100644 --- a/plugins/module_utils/ansible_freeipa_module.py +++ b/plugins/module_utils/ansible_freeipa_module.py @@ -122,12 +122,9 @@ def api_connect(): def api_command(module, command, name, args): """ - Call ipa.Command, use AnsibleModule.fail_json for error handling + Call ipa.Command """ - try: - return api.Command[command](name, **args) - except Exception as e: - module.fail_json(msg="%s: %s" % (command, e)) + return api.Command[command](name, **args) def execute_api_command(module, principal, password, command, name, args):