# How do I execute ALL the task in a YML file locally?

**URL:** <https://forum.ansible.com/t/how-do-i-execute-all-the-task-in-a-yml-file-locally/22881>\
**Category:** Ansible Project\
**Created:** [October 25, 2016, 3:02pm UTC](https://forum.ansible.com/t/how-do-i-execute-all-the-task-in-a-yml-file-locally/22881 "2016-10-25T15:02:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZillaYT](https://avatars.discourse-cdn.com/v4/letter/z/4da419/32.png) [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Post date:** [October 25, 2016, 3:02pm UTC](https://forum.ansible.com/t/how-do-i-execute-all-the-task-in-a-yml-file-locally/22881/1 "2016-10-25T15:02:48Z")

</div>

I have a role whose main.yml file includes several \*.yml files, e.g.,

`  
main.yml

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [October 25, 2016, 3:14pm UTC](https://forum.ansible.com/t/how-do-i-execute-all-the-task-in-a-yml-file-locally/22881/2 "2016-10-25T15:14:24Z")

</div>

Have you looked at delegate\_to ?

[http://docs.ansible.com/ansible/playbooks\_delegation.html#id10](http://docs.ansible.com/ansible/playbooks_delegation.html#id10)

HTH,  
Patrick

---

<div class="post-metadata">

**Author:** ![ZillaYT](https://avatars.discourse-cdn.com/v4/letter/z/4da419/32.png) [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Post date:** [October 25, 2016, 3:23pm UTC](https://forum.ansible.com/t/how-do-i-execute-all-the-task-in-a-yml-file-locally/22881/3 "2016-10-25T15:23:11Z")

</div>

Examples for delegate\_to, local\_action, etc. all show them being added per task. Though this will definitely accomplish what I want, I just want to do it in a more “file-global” way. Again, per my OP.

Chris

---

<div class="post-metadata">

**Author:** ![ZillaYT](https://avatars.discourse-cdn.com/v4/letter/z/4da419/32.png) [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Post date:** [October 25, 2016, 3:44pm UTC](https://forum.ansible.com/t/how-do-i-execute-all-the-task-in-a-yml-file-locally/22881/4 "2016-10-25T15:44:50Z")

</div>

IOW, I want to do all the tasks inside the YML file on my local machine in “one fell swoop.”
