mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Merge pull request #2623 from willthames/when_set_bug
Prevent premature variable substitution in tasks
This commit is contained in:
commit
e7f5186dec
3 changed files with 60 additions and 1 deletions
|
@ -65,7 +65,11 @@ class Play(object):
|
|||
|
||||
self._update_vars_files_for_host(None)
|
||||
|
||||
self._ds = ds = template.template(basedir, ds, self.vars)
|
||||
for key in ds:
|
||||
if key != 'tasks':
|
||||
ds[key] = template.template(basedir, ds[key], self.vars)
|
||||
|
||||
self._ds = ds
|
||||
|
||||
hosts = ds.get('hosts')
|
||||
if hosts is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue