Skip to content
Snippets Groups Projects
Commit 1ae2c1eb authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman
Browse files

role: Use IPAAnsibleModule method to validate arguments.

Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
parent efa67303
Branches
Tags
No related merge requests found
...@@ -151,11 +151,7 @@ def check_parameters(module): ...@@ -151,11 +151,7 @@ def check_parameters(module):
if action != "member": if action != "member":
invalid.extend(['privilege']) invalid.extend(['privilege'])
for arg in invalid: module.params_fail_used_invalid(invalid, state, action)
if module.params_get(arg) is not None:
module.fail_json(
msg="Argument '%s' can not be used with action '%s'" %
(arg, state))
def member_intersect(module, attr, memberof, res_find): def member_intersect(module, attr, memberof, res_find):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment