mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 11:54:47 +00:00
Merge pull request #654 from rjeffman/templates_variables_invtest
Fix module templates README and invalid parameter tests.
This commit is contained in:
@@ -119,6 +119,8 @@ Variable | Description | Required
|
|||||||
-------- | ----------- | --------
|
-------- | ----------- | --------
|
||||||
`ipaadmin_principal` | The admin principal is a string and defaults to `admin` | no
|
`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
|
`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
|
`name` \| `ALIAS` | The list of $name name strings. | yes
|
||||||
`PARAMETER1` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
|
`PARAMETER1` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
|
||||||
`PARAMETER2` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
|
`PARAMETER2` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
|
||||||
|
|||||||
@@ -84,6 +84,8 @@ Variable | Description | Required
|
|||||||
-------- | ----------- | --------
|
-------- | ----------- | --------
|
||||||
`ipaadmin_principal` | The admin principal is a string and defaults to `admin` | no
|
`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
|
`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
|
`name` \| `ALIAS` | The list of $name name strings. | yes
|
||||||
`PARAMETER1` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
|
`PARAMETER1` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
|
||||||
`PARAMETER2` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
|
`PARAMETER2` \| `API_PARAMETER_NAME` | DESCRIPTION | BOOL
|
||||||
|
|||||||
@@ -185,11 +185,7 @@ def main():
|
|||||||
if action == "$name":
|
if action == "$name":
|
||||||
invalid.append("PARAMETER2")
|
invalid.append("PARAMETER2")
|
||||||
|
|
||||||
for x in invalid:
|
ansible_module.params_fail_used_invalid(invalid, state, action)
|
||||||
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))
|
|
||||||
|
|
||||||
# Init
|
# Init
|
||||||
|
|
||||||
|
|||||||
@@ -151,11 +151,7 @@ def main():
|
|||||||
ansible_module.fail_json(msg="No name given.")
|
ansible_module.fail_json(msg="No name given.")
|
||||||
invalid = ["PARAMETER1", "PARAMETER2"]
|
invalid = ["PARAMETER1", "PARAMETER2"]
|
||||||
|
|
||||||
for x in invalid:
|
ansible_module.params_fail_used_invalid(invalid, state)
|
||||||
if vars()[x] is not None:
|
|
||||||
ansible_module.fail_json(
|
|
||||||
msg="Argument '%s' can not be used with state '%s'" %
|
|
||||||
(x, state))
|
|
||||||
|
|
||||||
# Init
|
# Init
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user