Listen: One Trigger, Many Handlers
Fan out a single notification.
One Event, Many Reactions
Sometimes one change should trigger several handlers at once. The listen keyword lets many handlers subscribe to a single topic.
Notify a Topic, Not a Name
With listen, a task's notify points at a logical event name instead of one specific handler title.
- name: Update certs
ansible.builtin.copy:
src: site.pem
dest: /etc/ssl/site.pem
notify: restart web stackAll lessons in this course
- Notify a Handler on Change
- Defining Handlers & Restart Patterns
- When Handlers Run & flush_handlers
- Listen: One Trigger, Many Handlers