mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-01 19:54:24 -07:00
Template handler name
This commit is contained in:
parent
c309381f19
commit
8b5283f547
1 changed files with 8 additions and 1 deletions
|
@ -831,7 +831,14 @@ class StrategyBase:
|
||||||
# we consider the ability of meta tasks to flush handlers
|
# we consider the ability of meta tasks to flush handlers
|
||||||
for handler in handler_block.block:
|
for handler in handler_block.block:
|
||||||
if handler._uuid in self._notified_handlers and len(self._notified_handlers[handler._uuid]):
|
if handler._uuid in self._notified_handlers and len(self._notified_handlers[handler._uuid]):
|
||||||
result = self._do_handler_run(handler, handler.get_name(), iterator=iterator, play_context=play_context)
|
handler_vars = self._variable_manager.get_vars(play=iterator._play, task=handler)
|
||||||
|
templar = Templar(loader=self._loader, variables=handler_vars)
|
||||||
|
handler_name = handler.get_name()
|
||||||
|
try:
|
||||||
|
handler_name = templar.template(handler_name)
|
||||||
|
except (UndefinedError, AnsibleUndefinedVariable):
|
||||||
|
pass
|
||||||
|
result = self._do_handler_run(handler, handler_name, iterator=iterator, play_context=play_context)
|
||||||
if not result:
|
if not result:
|
||||||
break
|
break
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue