# Controlling order in which hosts are accessed

**URL:** <https://forum.ansible.com/t/controlling-order-in-which-hosts-are-accessed/13075>\
**Category:** Ansible Project\
**Created:** [July 5, 2013, 7:43pm UTC](https://forum.ansible.com/t/controlling-order-in-which-hosts-are-accessed/13075 "2013-07-05T19:43:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimon](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@Dimon](https://forum.ansible.com/u/Dimon)\
**Post date:** [July 5, 2013, 7:43pm UTC](https://forum.ansible.com/t/controlling-order-in-which-hosts-are-accessed/13075/1 "2013-07-05T19:43:15Z")

</div>

Sorry for asking something that sounds like an FAQ, but my Google-foo is off today and I can’t find the answer to this question: using “ansible” (not “ansible-playbook”) is there a way to control the order in which hosts are accessed. I realize that there’s concurency in play, but in my case “-f 1” is a fine option too, however it seems to iterate over hosts semi-randomly. What am I missing?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 5, 2013, 10:28pm UTC](https://forum.ansible.com/t/controlling-order-in-which-hosts-are-accessed/13075/2 "2013-07-05T22:28:35Z")

</div>

With --forks \> 1, It’s iterating over them in order, but they are returning when they are returning.

Hosts are sorted before they get squeezed through the ringer.

---

<div class="post-metadata">

**Author:** ![Dimon](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@Dimon](https://forum.ansible.com/u/Dimon)\
**Post date:** [July 5, 2013, 10:38pm UTC](https://forum.ansible.com/t/controlling-order-in-which-hosts-are-accessed/13075/3 "2013-07-05T22:38:31Z")

</div>

great. I don’t care about the reporting, what I do care is the order of execution in some cases. thanks.
