mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix issue #13370
all_blocks is referenced after the loop over included_files, so it needs to be initialized before this loop, not inside.
This commit is contained in:
parent
9a6ae1d62a
commit
c6e400fbea
1 changed files with 1 additions and 1 deletions
|
@ -145,6 +145,7 @@ class StrategyModule(StrategyBase):
|
|||
return False
|
||||
|
||||
if len(included_files) > 0:
|
||||
all_blocks = dict((host, []) for host in hosts_left)
|
||||
for included_file in included_files:
|
||||
# included hosts get the task list while those excluded get an equal-length
|
||||
# list of noop tasks, to make sure that they continue running in lock-step
|
||||
|
@ -157,7 +158,6 @@ class StrategyModule(StrategyBase):
|
|||
continue
|
||||
|
||||
display.debug("generating all_blocks data")
|
||||
all_blocks = dict((host, []) for host in hosts_left)
|
||||
display.debug("done generating all_blocks data")
|
||||
for new_block in new_blocks:
|
||||
task_vars = self._variable_manager.get_vars(loader=self._loader, play=iterator._play, task=included_file._task)
|
||||
|
|
Loading…
Reference in a new issue