# run handlers at

**URL:** <https://forum.ansible.com/t/run-handlers-at/16821>\
**Category:** Ansible Project\
**Created:** [November 19, 2014, 9:45am UTC](https://forum.ansible.com/t/run-handlers-at/16821 "2014-11-19T09:45:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahaitoute](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@ahaitoute](https://forum.ansible.com/u/ahaitoute)\
**Post date:** [November 19, 2014, 9:45am UTC](https://forum.ansible.com/t/run-handlers-at/16821/1 "2014-11-19T09:45:49Z")

</div>

Hello,

In the following paragraph [http://docs.ansible.com/playbooks\_best\_practices.html#task-and-handler-organization-for-a-role](http://docs.ansible.com/playbooks_best_practices.html#task-and-handler-organization-for-a-role) it says:

_“…handlers are only fired when certain tasks report changes, and are run at the end of each play”_

Is it possible to run handlers directly instead of the end of each play? If not, is it possible to run a task after a handler has been run?

Thank you for your help?

---

<div class="post-metadata">

**Author:** ![Fred\_Badel](https://avatars.discourse-cdn.com/v4/letter/f/f07891/32.png) [@Fred\_Badel](https://forum.ansible.com/u/Fred_Badel)\
**Post date:** [November 19, 2014, 3:00pm UTC](https://forum.ansible.com/t/run-handlers-at/16821/2 "2014-11-19T15:00:18Z")

</div>

Hi,

You can use

- meta: flush\_handlers

within your playbook, all pending handlers will be executed.  
You can then go on with you playbook

The doc also state that:  
"Roles are described later on. It’s worthwhile to point out that handlers are automatically processed between ‘pre\_tasks’, ‘roles’, ‘tasks’, and ‘post\_tasks’ "  
[http://docs.ansible.com/playbooks\_intro.html#handlers-running-operations-on-change](http://docs.ansible.com/playbooks_intro.html#handlers-running-operations-on-change)  
So, if you need to run some tasks after you handlers have been fired, you can use a “post\_tasks” section at the end of you playbook.

Cheers,

Fred
