Quiz Entry - updated: 2026.11.12
Does force_handlers: true make a task that reported ok or failed notify its handler? And what happens to handlers when a failed task has ignore_errors: true?
No: it only runs handlers that were already notified, and only changed notifies. With ignore_errors: true, the play doesn't fail at all, so handlers run as usual even with force_handlers: false.
Two separate questions are involved, and mixing them up is a common mistake:
- Was the handler notified? Only a task that reports
changednotifies. A task that reportsokorfailednever does, andforce_handlersdoesn't change that. - Do notified handlers get to run? By default, not on a host whose play failed.
force_handlers: trueanswers "yes, run them anyway".
With ignore_errors: true on the failing task, the failure is ignored and the play carries on to its normal end, where the queued handlers run. force_handlers isn't needed there, unless some other error makes the play fail.
Go deeper:
Handlers and failure (official docs) โ how failures interact with notified handlers.