mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Expand vars_files identically for lists and non-lists
This commit is contained in:
parent
57a34d914f
commit
dff8d7be04
1 changed files with 3 additions and 2 deletions
|
@ -186,9 +186,10 @@ class Play(object):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
fpath = utils.path_dwim(self.playbook.basedir, utils.template(filename, self.vars))
|
filename2 = utils.template(filename, self.playbook.SETUP_CACHE[host])
|
||||||
|
filename2 = utils.template(filename2, self.vars)
|
||||||
|
fpath = utils.path_dwim(self.playbook.basedir, filename2)
|
||||||
new_vars = utils.parse_yaml_from_file(fpath)
|
new_vars = utils.parse_yaml_from_file(fpath)
|
||||||
if new_vars:
|
if new_vars:
|
||||||
self.playbook.SETUP_CACHE[host].update(new_vars)
|
self.playbook.SETUP_CACHE[host].update(new_vars)
|
||||||
#else: could warn if vars file contains no vars.
|
#else: could warn if vars file contains no vars.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue