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.
* 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:
templatewrites a new config file: resultchanged, 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:
Notifying handlers (official docs) — how notification works.
Defining when tasks change (official docs) — influencing notification with
changed_when.