parent
982a36c915
commit
d1afcbced1
2 changed files with 8 additions and 1 deletions
|
@ -0,0 +1,3 @@
|
||||||
|
bugfixes:
|
||||||
|
- handlers - Cache templated handler name on included handlers to avoid
|
||||||
|
later templating errors (https://github.com/ansible/ansible/issues/58769)
|
|
@ -891,9 +891,13 @@ class StrategyBase:
|
||||||
if not iterator.is_failed(host) or iterator._play.force_handlers:
|
if not iterator.is_failed(host) or iterator._play.force_handlers:
|
||||||
task_vars = self._variable_manager.get_vars(play=iterator._play, host=host, task=handler)
|
task_vars = self._variable_manager.get_vars(play=iterator._play, host=host, task=handler)
|
||||||
self.add_tqm_variables(task_vars, play=iterator._play)
|
self.add_tqm_variables(task_vars, play=iterator._play)
|
||||||
|
templar = Templar(loader=self._loader, variables=task_vars)
|
||||||
|
if not handler.cached_name:
|
||||||
|
handler.name = templar.template(handler.name)
|
||||||
|
handler.cached_name = True
|
||||||
|
|
||||||
self._queue_task(host, handler, task_vars, play_context)
|
self._queue_task(host, handler, task_vars, play_context)
|
||||||
|
|
||||||
templar = Templar(loader=self._loader, variables=task_vars)
|
|
||||||
if templar.template(handler.run_once) or bypass_host_loop:
|
if templar.template(handler.run_once) or bypass_host_loop:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue