# Structuring multiple similar services on single host

**URL:** <https://forum.ansible.com/t/structuring-multiple-similar-services-on-single-host/20156>\
**Category:** Ansible Project\
**Created:** [January 8, 2016, 4:26pm UTC](https://forum.ansible.com/t/structuring-multiple-similar-services-on-single-host/20156 "2016-01-08T16:26:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daan\_de\_Wit](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daan\_de\_Wit](https://forum.ansible.com/u/Daan_de_Wit)\
**Post date:** [January 8, 2016, 4:26pm UTC](https://forum.ansible.com/t/structuring-multiple-similar-services-on-single-host/20156/1 "2016-01-08T16:26:24Z")

</div>

Hi,

I’m seeking advice for how to best structure the inventory for our situation. We have multiple hosts, and each host is running multiple instances of the same software that we’d like to update using Ansible. Each instance has properties like port number etc. We would like to run updates on the same host in parallel.  
I am currently thinking of creating a list of instances per host. But that would not give us parallel updates, unless we use ‘fire and forget’ for the update task. But then we would need to add some way to detect whether all instances are updated correctly.

Do you have any suggestions for how we can / should tackle this?

Thanks!  
Daan

---

<div class="post-metadata">

**Author:** ![David\_Karban](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@David\_Karban](https://forum.ansible.com/u/David_Karban)\
**Post date:** [January 11, 2016, 4:41pm UTC](https://forum.ansible.com/t/structuring-multiple-similar-services-on-single-host/20156/2 "2016-01-11T16:41:04Z")

</div>

Hi,

if you trick ansible to think every instance is on it`s own server, it will go thru all of them in parallel (to the forks count of course). For static inventory it would be like:

[servers]  
app1 ansible\_ssh\_host=192.168.1.2  
app2 ansible\_ssh\_host=192.168.1.2

Ansible than access to the app1 and app2 like on the separate servers.
