Correctly compile handler blocks for dependent roles
This commit is contained in:
parent
0b16580567
commit
d0d9be30d5
2 changed files with 6 additions and 5 deletions
|
@ -288,7 +288,12 @@ class Role(Base, Become, Conditional, Taggable):
|
||||||
return self._task_blocks[:]
|
return self._task_blocks[:]
|
||||||
|
|
||||||
def get_handler_blocks(self):
|
def get_handler_blocks(self):
|
||||||
return self._handler_blocks[:]
|
block_list = []
|
||||||
|
for dep in self.get_direct_dependencies():
|
||||||
|
dep_blocks = dep.get_handler_blocks()
|
||||||
|
block_list.extend(dep_blocks)
|
||||||
|
block_list.extend(self._handler_blocks)
|
||||||
|
return block_list
|
||||||
|
|
||||||
def has_run(self):
|
def has_run(self):
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -366,10 +366,6 @@ class StrategyBase:
|
||||||
|
|
||||||
result = True
|
result = True
|
||||||
|
|
||||||
# FIXME: getting the handlers from the iterators play should be
|
|
||||||
# a method on the iterator, which may also filter the list
|
|
||||||
# of handlers based on the notified list
|
|
||||||
|
|
||||||
for handler_block in iterator._play.handlers:
|
for handler_block in iterator._play.handlers:
|
||||||
# FIXME: handlers need to support the rescue/always portions of blocks too,
|
# FIXME: handlers need to support the rescue/always portions of blocks too,
|
||||||
# but this may take some work in the iterator and gets tricky when
|
# but this may take some work in the iterator and gets tricky when
|
||||||
|
|
Loading…
Add table
Reference in a new issue