Commit 1cb4e0be by James Cammarata

Fix bug in implicit block squashing where block is not reassigned

Fixes #12333
parent 7deb8bbd
...@@ -50,10 +50,12 @@ def load_list_of_blocks(ds, play, parent_block=None, role=None, task_include=Non ...@@ -50,10 +50,12 @@ def load_list_of_blocks(ds, play, parent_block=None, role=None, task_include=Non
variable_manager=variable_manager, variable_manager=variable_manager,
loader=loader loader=loader
) )
# Implicit blocks are created by bare tasks listed in a play withou # Implicit blocks are created by bare tasks listed in a play without
# an explicit block statement. If we have two implicit blocks in a row, # an explicit block statement. If we have two implicit blocks in a row,
# squash them down to a single block to save processing time later. # squash them down to a single block to save processing time later.
if b._implicit and len(block_list) > 0 and block_list[-1]._implicit: if b._implicit and len(block_list) > 0 and block_list[-1]._implicit:
for t in b.block:
t._block = block_list[-1]
block_list[-1].block.extend(b.block) block_list[-1].block.extend(b.block)
else: else:
block_list.append(b) block_list.append(b)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment