1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #421 from bradobro/fix_ignore_no_vars

Avoid traceback when vars file has no vars items. Could warn or fail instead.
This commit is contained in:
Michael DeHaan 2012-05-29 08:31:37 -07:00
commit b9fd948c26

View file

@ -186,5 +186,7 @@ class Play(object):
fpath = utils.path_dwim(self.playbook.basedir, utils.template(filename, self.vars))
new_vars = utils.parse_yaml_from_file(fpath)
self.playbook.SETUP_CACHE[host].update(new_vars)
if new_vars:
self.playbook.SETUP_CACHE[host].update(new_vars)
#else: could warn if vars file contains no vars.