0Pricing
Ansible Academy · Lesson

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 stack

All lessons in this course

  1. Notify a Handler on Change
  2. Defining Handlers & Restart Patterns
  3. When Handlers Run & flush_handlers
  4. Listen: One Trigger, Many Handlers
← Back to Ansible Academy