From 1cb4e0be1ced0975659b2328c32b1f63b6e15f71 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Sat, 12 Sep 2015 11:27:30 -0400 Subject: [PATCH] Fix bug in implicit block squashing where block is not reassigned Fixes #12333 --- lib/ansible/playbook/helpers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/playbook/helpers.py b/lib/ansible/playbook/helpers.py index 98c9ffae303..958e72206c6 100644 --- a/lib/ansible/playbook/helpers.py +++ b/lib/ansible/playbook/helpers.py @@ -50,10 +50,12 @@ def load_list_of_blocks(ds, play, parent_block=None, role=None, task_include=Non variable_manager=variable_manager, 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, # 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: + for t in b.block: + t._block = block_list[-1] block_list[-1].block.extend(b.block) else: block_list.append(b)