# Looking for singleton...  sort of.

**URL:** <https://forum.ansible.com/t/looking-for-singleton-sort-of/16510>\
**Category:** Ansible Project\
**Created:** [October 14, 2014, 10:59pm UTC](https://forum.ansible.com/t/looking-for-singleton-sort-of/16510 "2014-10-14T22:59:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tiglath](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@Tiglath](https://forum.ansible.com/u/Tiglath)\
**Post date:** [October 14, 2014, 10:59pm UTC](https://forum.ansible.com/t/looking-for-singleton-sort-of/16510/1 "2014-10-14T22:59:00Z")

</div>

In my app deployment scheme the first part happens locally, and the second part in the remote targets.

Now, I want the first part to be executed only once no matter how many hosts the run is for, then the second part can be parallelized

Is there a way to indicate that a part of the play execute a single time, and others once per host?

Thanks

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [October 14, 2014, 11:00pm UTC](https://forum.ansible.com/t/looking-for-singleton-sort-of/16510/2 "2014-10-14T23:00:04Z")

</div>

seems like you want run\_once, just take into account that if you use  
serial, it won't be per play but per serial batch
