mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
deprecate all bare variable conversions (not debug)
now deprecation message appears with variable name in all spots where this occurs debug's var= option is excluded as this is only place where bare variables shold actually be accepted.
This commit is contained in:
parent
28cf4bc00b
commit
dc15eb806e
2 changed files with 13 additions and 4 deletions
|
@ -46,7 +46,7 @@ class ActionModule(ActionBase):
|
|||
|
||||
elif 'var' in self._task.args:
|
||||
try:
|
||||
results = self._templar.template(self._task.args['var'], convert_bare=True, fail_on_undefined=True)
|
||||
results = self._templar.template(self._task.args['var'], convert_bare=True, fail_on_undefined=True, bare_deprecated=False)
|
||||
if results == self._task.args['var']:
|
||||
raise AnsibleUndefinedVariable
|
||||
except AnsibleUndefinedVariable:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue