LOGBOOK

HELP

Quiz Entry - updated: 2026.11.12

Which task result notifies a handler, and which results don't?

Only changed notifies. A task that reports ok (nothing to do), skipped or failed does not notify its handlers.

Task results: changed sends a notification to the handler queue, while ok, skipped and failed send none

* Only a changed result puts the handler in the queue. *

The notify line on a task is a conditional request: "if you change something, wake up this handler". So:

  • template writes a new config file: result changed, handler notified.
  • The file was already identical: result ok, no notification, no restart.
  • A package task finds the package installed: ok, no notification.

This is why handlers and idempotent modules belong together: the module's own change detection decides whether the follow-up action is needed. If a task notifies nothing even though you expected it to, check what it reported; a command/shell task with changed_when: false will never notify, for example.

Go deeper:

From Quiz: ITIA / Ansible Task Control: Loops, Conditionals, Handlers and Error Handling | Updated: Nov 12, 2026