explain 'bare variables' (#49577)

pull/49666/head
Brian Coca 6 years ago committed by GitHub
parent b6220ce16a
commit 597c258e0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- explain 'bare variables' in error message

@ -145,8 +145,8 @@ class ModuleArgsParser:
if templar._contains_vars(additional_args): if templar._contains_vars(additional_args):
final_args['_variable_params'] = additional_args final_args['_variable_params'] = additional_args
else: else:
raise AnsibleParserError("Complex args containing variables cannot use bare variables, and must use the full variable style " raise AnsibleParserError("Complex args containing variables cannot use bare variables (without Jinja2 delimiters), "
"('{{var_name}}')") "and must use the full variable style ('{{var_name}}')")
elif isinstance(additional_args, dict): elif isinstance(additional_args, dict):
final_args.update(additional_args) final_args.update(additional_args)
else: else:

Loading…
Cancel
Save