mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-06 21:33:14 +00:00
role: 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:
@@ -151,11 +151,7 @@ def check_parameters(module):
|
||||
if action != "member":
|
||||
invalid.extend(['privilege'])
|
||||
|
||||
for arg in invalid:
|
||||
if module.params_get(arg) is not None:
|
||||
module.fail_json(
|
||||
msg="Argument '%s' can not be used with action '%s'" %
|
||||
(arg, state))
|
||||
module.params_fail_used_invalid(invalid, state, action)
|
||||
|
||||
|
||||
def member_intersect(module, attr, memberof, res_find):
|
||||
|
||||
Reference in New Issue
Block a user