非常简短的问题。我只想知道为什么当我们使用处理程序时,"listen“部分不接受变量?
- name: notify components
command: echo "this task will notify all the components"
notify: "hello world"- debug:
msg: "Hello world !!"
listen: "hello world"
- set_fact:
myvar: "hello world"
listen: "hello world"
- debug:
msg: "Hello world !! with var"
listen: "{{myvar}}"为什么这一部分不起作用?Listen不接受变量吗?
发布于 2020-09-21 22:55:26
有关handlers documentation的说明中专门记录了这一点
处理程序名称是可模板的,而侦听主题不是。
https://stackoverflow.com/questions/63994116
复制相似问题