# force handlers to run

**URL:** <https://forum.ansible.com/t/force-handlers-to-run/17601>\
**Category:** Ansible Project\
**Created:** [February 23, 2015, 8:16pm UTC](https://forum.ansible.com/t/force-handlers-to-run/17601 "2015-02-23T20:16:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacob\_Weber1](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Jacob\_Weber1](https://forum.ansible.com/u/Jacob_Weber1)\
**Post date:** [February 23, 2015, 8:16pm UTC](https://forum.ansible.com/t/force-handlers-to-run/17601/1 "2015-02-23T20:16:29Z")

</div>

Say I have a playbook like this:

- name: install apache config  
copy: src=httpd.conf dest=/etc/httpd.conf  
notify: restart apache
- name: do something that fails

command: false

I ran it without --force-handlers. The first command ran successfully, and reported a change. The second command failed, and as a result, the “restart apache” handler doesn’t get called.

If I run it again, even with --force-handlers, the first command won’t report a change, so the handler still won’t get called. This leaves the node in an incomplete state.

Is there a way to handle this kind of situation easily? Obviously in this case I can manually restart Apache, but in more complex cases, I’d like to be able to force the handler to run.

Or is the solution to always run with --force-handlers, so it never gets in this state to begin with?

Thanks,  
Jacob

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [February 23, 2015, 11:28pm UTC](https://forum.ansible.com/t/force-handlers-to-run/17601/2 "2015-02-23T23:28:27Z")

</div>

Yes, currently the only way to avoid that is always run with  
--force-handlers. I do have on the wishlist to add this to ansible.cfg  
so you can set it globally and not specify it.
