Check to make sure default_vars in the datastructure isn't empty
Fixes #4129
This commit is contained in:
parent
4d352e69fc
commit
c5bb1394b9
1 changed files with 6 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue