diff --git a/utils/templates/README-module+member.md.in b/utils/templates/README-module+member.md.in
index 026496b3c88a28a98f40ca33b503a3aab7f54283..074ea4ec1888df763c6e151146dcaf49fb33d2e3 100644
--- a/utils/templates/README-module+member.md.in
+++ b/utils/templates/README-module+member.md.in
@@ -119,6 +119,8 @@ Variable | Description | Required
 -------- | ----------- | --------
 `ipaadmin_principal` | The admin principal is a string and defaults to `admin` | no
 `ipaadmin_password` | The admin password is a string and is required if there is no admin ticket available on the node | no
+`ipaapi_context` | The context in which the module will execute. Executing in a server context is preferred. If not provided context will be determined by the execution environment. Valid values are `server` and `client`. | no
+`ipaapi_ldap_cache` | Use LDAP cache for IPA connection. The bool setting defaults to yes. (bool) | no
 `name` \| `ALIAS` | The list of $name name strings. | yes
 `PARAMETER1` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
 `PARAMETER2` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
diff --git a/utils/templates/README-module.md.in b/utils/templates/README-module.md.in
index e5054fb29cc612d94ac305fdc3daad822f690fbb..25c69e4dd7e7c2b681192acd27f8e75abedbd13c 100644
--- a/utils/templates/README-module.md.in
+++ b/utils/templates/README-module.md.in
@@ -84,6 +84,8 @@ Variable | Description | Required
 -------- | ----------- | --------
 `ipaadmin_principal` | The admin principal is a string and defaults to `admin` | no
 `ipaadmin_password` | The admin password is a string and is required if there is no admin ticket available on the node | no
+`ipaapi_context` | The context in which the module will execute. Executing in a server context is preferred. If not provided context will be determined by the execution environment. Valid values are `server` and `client`. | no
+`ipaapi_ldap_cache` | Use LDAP cache for IPA connection. The bool setting defaults to yes. (bool) | no
 `name` \| `ALIAS` | The list of $name name strings. | yes
 `PARAMETER1` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
 `PARAMETER2` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
diff --git a/utils/templates/ipamodule+member.py.in b/utils/templates/ipamodule+member.py.in
index 7e7ad8ea18b1bc90cc1d49e0d3834881870364a2..d3438b1b4cc224e16420cdeb35cf437044fe72de 100644
--- a/utils/templates/ipamodule+member.py.in
+++ b/utils/templates/ipamodule+member.py.in
@@ -185,11 +185,7 @@ def main():
         if action == "$name":
             invalid.append("PARAMETER2")
 
-    for x in invalid:
-        if vars()[x] is not None:
-            ansible_module.fail_json(
-                msg="Argument '%s' can not be used with action "
-                "'%s' and state '%s'" % (x, action, state))
+    ansible_module.params_fail_used_invalid(invalid, state, action)
 
     # Init
 
diff --git a/utils/templates/ipamodule.py.in b/utils/templates/ipamodule.py.in
index b179a0b8f66ac8fb78a5cbd5a814b90b3e91c757..e305c9765d6f404c4956811986759d91f48f2703 100644
--- a/utils/templates/ipamodule.py.in
+++ b/utils/templates/ipamodule.py.in
@@ -151,11 +151,7 @@ def main():
             ansible_module.fail_json(msg="No name given.")
         invalid = ["PARAMETER1", "PARAMETER2"]
 
-    for x in invalid:
-        if vars()[x] is not None:
-            ansible_module.fail_json(
-                msg="Argument '%s' can not be used with state '%s'" %
-                (x, state))
+    ansible_module.params_fail_used_invalid(invalid, state)
 
     # Init