Make sure blocks use their parents dependency chains

Fixes a bug inroduced in fb797a9 where included tasks in a role
were not being executed because the child blocks had no dep chain
set.
pull/14109/head
James Cammarata 9 years ago
parent 2b02e8e2b4
commit a8ffa02134

@ -48,13 +48,17 @@ class Block(Base, Become, Conditional, Taggable):
self._parent_block = None
self._use_handlers = use_handlers
self._implicit = implicit
self._dep_chain = []
if task_include:
self._task_include = task_include
elif parent_block:
self._parent_block = parent_block
if parent_block:
self._dep_chain = parent_block._dep_chain[:]
else:
self._dep_chain = []
super(Block, self).__init__()
def get_vars(self):
@ -374,3 +378,4 @@ class Block(Base, Become, Conditional, Taggable):
def has_tasks(self):
return len(self.block) > 0 or len(self.rescue) > 0 or len(self.always) > 0

Loading…
Cancel
Save