diff --git a/utils/templates/ipamodule+member.py.in b/utils/templates/ipamodule+member.py.in index 901525026b4145c37ad10748e617db9c619b856b..dc682cf9eeb7705fd3848a699171320a567e03b7 100644 --- a/utils/templates/ipamodule+member.py.in +++ b/utils/templates/ipamodule+member.py.in @@ -36,6 +36,7 @@ short description: Manage FreeIPA $name description: Manage FreeIPA $name and $name members extends_documentation_fragment: - ipamodule_base_docs + - ipamoudle_base_docs.delete_continue options: name: description: The list of $name name strings. @@ -152,6 +153,7 @@ def main(): choices=["present", "absent"]), ), supports_check_mode=True, + ipa_module_options=["delete_continue"] ) ansible_module._ansible_debug = True @@ -169,6 +171,8 @@ def main(): PARAMETER2 = ansible_module.params_get_lowercase("PARAMETER2") action = ansible_module.params_get("action") + delete_continue = ansible_module.params_get("delete_continue") + # state state = ansible_module.params_get("state") @@ -249,7 +253,9 @@ def main(): elif state == "absent": if action == "$name": if res_find is not None: - commands.append([name, "$name_del", {}]) + commands.append( + [name, "$name_del", {"continue": delete_continue}] + ) elif action == "member": if res_find is None: @@ -275,10 +281,12 @@ def main(): }]) # Remove members + if PARAMETER2_del: commands.append([name, "$name_remove_member", { "PARAMETER2": PARAMETER2_del, + "continue": delete_continue, }]) # Execute commands diff --git a/utils/templates/ipamodule.py.in b/utils/templates/ipamodule.py.in index b66be523a85e1356671c2394d9f0eb1e46dde574..07fe2ac470d2ed61bb351791bedabed41ff5b7f0 100644 --- a/utils/templates/ipamodule.py.in +++ b/utils/templates/ipamodule.py.in @@ -36,6 +36,7 @@ short description: Manage FreeIPA $name description: Manage FreeIPA $name extends_documentation_fragment: - ipamodule_base_docs + - ipamodule_base_docs.delete_continue options: name: description: The list of $name name strings. @@ -124,6 +125,7 @@ def main(): choices=["present", "absent"]), ), supports_check_mode=True, + ipa_module_options=["delete_continue"], ) ansible_module._ansible_debug = True @@ -140,6 +142,8 @@ def main(): # these parameters, use IPAAnsibleModule.params_get_lowercase. PARAMETER2 = ansible_module.params_get_lowercase("PARAMETER2") + delete_continue = ansible_module.params_get("delete_continue") + # state state = ansible_module.params_get("state") @@ -191,7 +195,9 @@ def main(): elif state == "absent": if res_find is not None: - commands.append([name, "$name_del", {}]) + commands.append( + [name, "$name_del", {"continue": delete_continue}] + ) else: ansible_module.fail_json(msg="Unkown state '%s'" % state)