mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 11:10:21 -07:00
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:
|
else:
|
||||||
raise errors.AnsibleError("parse error: task includes cannot be used with other directives: %s" % k)
|
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:
|
if 'vars' in x:
|
||||||
task_vars = utils.combine_vars(task_vars, x['vars'])
|
task_vars = utils.combine_vars(task_vars, x['vars'])
|
||||||
if 'only_if' in x:
|
if 'only_if' in x:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue