Merge pull request #4836 from dekked/devel
Bug fix: support running handlers parametrized by name
This commit is contained in:
commit
f51b8ffde9
1 changed files with 7 additions and 5 deletions
|
@ -544,10 +544,12 @@ class PlayBook(object):
|
|||
for handler in play.handlers():
|
||||
if len(handler.notified_by) > 0:
|
||||
self.inventory.restrict_to(handler.notified_by)
|
||||
if handler.name not in fired_names:
|
||||
# Resolve the variables first
|
||||
handler_name = template(play.basedir, handler.name, handler.module_vars)
|
||||
if handler_name not in fired_names:
|
||||
self._run_task(play, handler, True)
|
||||
# prevent duplicate handler includes from running more than once
|
||||
fired_names[handler.name] = 1
|
||||
fired_names[handler_name] = 1
|
||||
self.inventory.lift_restriction()
|
||||
new_list = handler.notified_by[:]
|
||||
for host in handler.notified_by:
|
||||
|
|
Loading…
Reference in a new issue