forcing specific handlers to run

One of the most frequent problems I have with Ansible is that I run a playbook, it fails halfway through, and as a result a bunch of handlers don’t run. If I start the playbook again, the tasks that should have triggered the handlers won’t appear as changes, so the handlers won’t run at all.

Wouldn’t it make sense for Ansible to have a way to manually trigger handlers? Maybe something like:
ansible-playbook playbook.yml --trigger “restart network, clear cache”

And if a run fails, Ansible could inform you of the argument you need to pass, to manually trigger the handlers that were skipped.

I know that Ansible has a --force-handlers option (https://github.com/ansible/ansible/issues/4777), but that means I have to know in advance to pass it, before the failure. Since errors are usually unexpected, and there’s no way to make this option the default, it’s unlikely that I will have passed it.

And I know you can manually add a task like “command: /bin/true” that triggers your handler, and then remove it, but this seems clumsy.

Jacob