mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 04:10:44 -03:30
Merge pull request #507 from AlanCoding/adhoc_word_smithing
[3.2.2] feedback on ad hoc prohibited vars error msg
This commit is contained in:
commit
2dd2541550
@ -2763,8 +2763,8 @@ class AdHocCommandSerializer(UnifiedJobSerializer):
|
||||
redacted_extra_vars, removed_vars = extract_ansible_vars(value)
|
||||
if removed_vars:
|
||||
raise serializers.ValidationError(_(
|
||||
"Variables {} are prohibited from use in ad hoc commands."
|
||||
).format(",".join(removed_vars)))
|
||||
"{} are prohibited from use in ad hoc commands."
|
||||
).format(", ".join(removed_vars)))
|
||||
return vars_validate_or_raise(value)
|
||||
|
||||
|
||||
|
||||
@ -2142,8 +2142,8 @@ class RunAdHocCommand(BaseTask):
|
||||
redacted_extra_vars, removed_vars = extract_ansible_vars(ad_hoc_command.extra_vars_dict)
|
||||
if removed_vars:
|
||||
raise ValueError(_(
|
||||
"unable to use {} variables with ad hoc commands"
|
||||
).format(",".format(removed_vars)))
|
||||
"{} are prohibited from use in ad hoc commands."
|
||||
).format(", ".join(removed_vars)))
|
||||
|
||||
args.extend(['-e', json.dumps(ad_hoc_command.extra_vars_dict)])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user