mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-30 11:24:50 +00:00
service: Use IPAAnsibleModule method to validate arguments.
Use the IPAAnsibleModule.params_fail_if_used method to validate arguments provided by user.
This commit is contained in:
@@ -335,11 +335,7 @@ def check_parameters(module, state, action, names, parameters):
|
|||||||
else:
|
else:
|
||||||
module.fail_json(msg="Invalid state '%s'" % (state))
|
module.fail_json(msg="Invalid state '%s'" % (state))
|
||||||
|
|
||||||
for _invalid in invalid:
|
module.params_fail_used_invalid(invalid, state, action)
|
||||||
if _invalid in parameters and parameters[_invalid] is not None:
|
|
||||||
module.fail_json(
|
|
||||||
msg="Argument '%s' can not be used with state '%s', "
|
|
||||||
"action '%s'" % (_invalid, state, action))
|
|
||||||
|
|
||||||
|
|
||||||
def init_ansible_module():
|
def init_ansible_module():
|
||||||
|
|||||||
Reference in New Issue
Block a user