parent
2688edb32b
commit
ac66e4001c
2 changed files with 5 additions and 5 deletions
|
@ -212,19 +212,19 @@ class Task(Base, Conditional, Taggable, Become):
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def get_vars(self):
|
def get_vars(self):
|
||||||
all_vars = self.vars.copy()
|
all_vars = dict()
|
||||||
if self._block:
|
if self._block:
|
||||||
all_vars.update(self._block.get_vars())
|
all_vars.update(self._block.get_vars())
|
||||||
if self._task_include:
|
if self._task_include:
|
||||||
all_vars.update(self._task_include.get_vars())
|
all_vars.update(self._task_include.get_vars())
|
||||||
|
|
||||||
#if isinstance(self.args, dict):
|
all_vars.update(self.vars)
|
||||||
# all_vars.update(self.args)
|
|
||||||
|
|
||||||
if 'tags' in all_vars:
|
if 'tags' in all_vars:
|
||||||
del all_vars['tags']
|
del all_vars['tags']
|
||||||
if 'when' in all_vars:
|
if 'when' in all_vars:
|
||||||
del all_vars['when']
|
del all_vars['when']
|
||||||
|
|
||||||
return all_vars
|
return all_vars
|
||||||
|
|
||||||
def copy(self, exclude_block=False):
|
def copy(self, exclude_block=False):
|
||||||
|
|
|
@ -406,9 +406,9 @@ class StrategyBase:
|
||||||
|
|
||||||
# set the vars for this task from those specified as params to the include
|
# set the vars for this task from those specified as params to the include
|
||||||
for b in block_list:
|
for b in block_list:
|
||||||
temp_vars = b.vars.copy()
|
temp_vars = b._task_include.vars.copy()
|
||||||
temp_vars.update(included_file._args.copy())
|
temp_vars.update(included_file._args.copy())
|
||||||
b.vars = temp_vars
|
b._task_include.vars = temp_vars
|
||||||
|
|
||||||
return block_list
|
return block_list
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue