Really short question. I just wanted to know why when we use handlers the "listen" section doesn't take variable?
- 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}}"
Why this section doesn't work? Listen doesn't take variables?
This is specifically documented in the notes on handlers documentation
Handler names are templatable and listen topics are not.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.