diff --git a/changelogs/fragments/explain_bare.yml b/changelogs/fragments/explain_bare.yml new file mode 100644 index 00000000000..47ca7e1a567 --- /dev/null +++ b/changelogs/fragments/explain_bare.yml @@ -0,0 +1,2 @@ +bugfixes: + - explain 'bare variables' in error message diff --git a/lib/ansible/parsing/mod_args.py b/lib/ansible/parsing/mod_args.py index 456f8666fb9..7ef4e3f801e 100644 --- a/lib/ansible/parsing/mod_args.py +++ b/lib/ansible/parsing/mod_args.py @@ -145,8 +145,8 @@ class ModuleArgsParser: if templar._contains_vars(additional_args): final_args['_variable_params'] = additional_args else: - raise AnsibleParserError("Complex args containing variables cannot use bare variables, and must use the full variable style " - "('{{var_name}}')") + raise AnsibleParserError("Complex args containing variables cannot use bare variables (without Jinja2 delimiters), " + "and must use the full variable style ('{{var_name}}')") elif isinstance(additional_args, dict): final_args.update(additional_args) else: