# local\_action is executed at the end and not in order its defined in.

**URL:** <https://forum.ansible.com/t/local-action-is-executed-at-the-end-and-not-in-order-its-defined-in/19077>\
**Category:** Ansible Project\
**Created:** [August 21, 2015, 5:39am UTC](https://forum.ansible.com/t/local-action-is-executed-at-the-end-and-not-in-order-its-defined-in/19077 "2015-08-21T05:39:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastien\_Hadjifotis](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Sebastien\_Hadjifotis](https://forum.ansible.com/u/Sebastien_Hadjifotis)\
**Post date:** [August 21, 2015, 5:39am UTC](https://forum.ansible.com/t/local-action-is-executed-at-the-end-and-not-in-order-its-defined-in/19077/1 "2015-08-21T05:39:48Z")

</div>



---

<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:** [August 21, 2015, 2:10pm UTC](https://forum.ansible.com/t/local-action-is-executed-at-the-end-and-not-in-order-its-defined-in/19077/2 "2015-08-21T14:10:21Z")

</div>

roles: executes before tasks:, put it in pre\_tasks: which executes before roles:
