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

Check to make sure default_vars in the datastructure isn't empty

Fixes #4129
This commit is contained in:
James Cammarata 2013-09-16 13:16:06 -05:00
parent 4d352e69fc
commit c5bb1394b9

View file

@ -407,7 +407,12 @@ class Play(object):
else:
raise errors.AnsibleError("parse error: task includes cannot be used with other directives: %s" % k)
default_vars = utils.combine_vars(self.default_vars, x.get('default_vars', {}))
default_vars = x.get('default_vars', {})
if not default_vars:
default_vars = self.default_vars
else:
default_vars = utils.combine_vars(self.default_vars, default_vars)
if 'vars' in x:
task_vars = utils.combine_vars(task_vars, x['vars'])
if 'only_if' in x: