Skip to content

Commit

Permalink
vault: Use IPAAnsibleModule method to validate arguments.
Browse files Browse the repository at this point in the history
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
  • Loading branch information
rjeffman committed Oct 1, 2021
1 parent d9f8d0b commit 31bc6fe
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions plugins/modules/ipavault.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,11 +483,7 @@ def check_parameters( # pylint: disable=unused-argument
module.fail_json(
msg="State `retrieved` do not support action `member`.")

for arg in invalid:
if vars()[arg] is not None:
module.fail_json(
msg="Argument '%s' can not be used with state '%s', "
"action '%s'" % (arg, state, action))
module.params_fail_if_used(invalid, state, action)


def check_encryption_params( # pylint: disable=unused-argument
Expand Down

0 comments on commit 31bc6fe

Please sign in to comment.