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

Fixes message when variable cannot be used in a given state action.

When using a variable that is invalid for a given action, the `action`
was not being displayed in the error message, leading to a poor user
experience.
parent a052160c
Branches
Tags
No related merge requests found
......@@ -304,8 +304,8 @@ def check_parameters(module, state, action, names, parameters):
for _invalid in invalid:
if parameters[_invalid] is not None:
module.fail_json(
msg="Argument '%s' can not be used with state '%s'" %
(_invalid, state))
msg="Argument '%s' can not be used with state '%s', "
"action '%s'" % (_invalid, state, action))
def init_ansible_module():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment