Fix bug in implicit block squashing where block is not reassigned

Fixes #12333
pull/12335/head
James Cammarata 9 years ago
parent 7deb8bbd1c
commit 1cb4e0be1c

@ -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)

Loading…
Cancel
Save