I think the current behavior is lacking, but could be worse. There are many things to consider when executing handlers. When a playbook run aborts, it might have been in the middle of reconfiguring a daemon. A handler which restarts said daemon would put the system out of service, so not executing the handler when something aborted the playbook seems fine to me. But the fact that the handler still needs to run should be recorded somewhere on the target host, in a form that describes when in the playbook run the handler would have been executed normally. Then, repeating the playbook could schedule the handler at the same point and execute if it doesn't fail again.
A storage could be something like "~/.ansible/postponed-handlers/". During role execution, a file named like the role would fill with handler names not yet present in the file. When role execution is finished, all handlers in the file would be executed and deleted line by line. Inexistent handler names (when playbook was modified) would be discarded. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8e8a97f1-0569-4afb-8ff3-c20bc5be4bee%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
