Handlers and failure
Ansible runshandlersat the end of each play. If a task notifies a handler but
another task fails later in the play, by default the handler doesnotrun on that host,
which may leave the host in an unexpected state. For example, a task could update
a configuration file and notify a handler to restart some service. If a
task later in the same play fails, the configuration file might be changed but
the service will not be restarted.
You can change this behavior with the--force-handlerscommand-line option,
by includingforce_handlers:Truein a play, or by addingforce_handlers=Trueto ansible.cfg. When handlers are forced, Ansible will run all notified handlers on
all hosts, even hosts with failed tasks. (Note that certain errors could still prevent
the handler from running, such as a host becoming unreachable.)