mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-04 01:33:09 +00:00
Give each task its own module_vars
Otherwise each task will overwrite the previous' items, among other things.
This commit is contained in:
@@ -116,8 +116,9 @@ class Play(object):
|
||||
mv[k] = utils.varReplaceWithItems(self.basedir, v, mv)
|
||||
include_file = utils.template(self.basedir, tokens[0], mv)
|
||||
data = utils.parse_yaml_from_file(utils.path_dwim(self.basedir, include_file))
|
||||
print data
|
||||
for y in data:
|
||||
results.append(Task(self,y,module_vars=mv))
|
||||
results.append(Task(self,y,module_vars=mv.copy()))
|
||||
elif type(x) == dict:
|
||||
task_vars = self.vars.copy()
|
||||
results.append(Task(self,x,module_vars=task_vars))
|
||||
|
||||
Reference in New Issue
Block a user