Structuring multiple similar services on single host

Skip to first unread message

Daan de Wit

unread,
Jan 8, 2016, 12:03:28 PM1/8/16
to Ansible Project
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

David Karban

unread,
Jan 11, 2016, 11:41:31 AM1/11/16
to ansible...@googlegroups.com
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.


David Karban
Linux server specialist/Specialista na správu linuxových serverů
www.karban.eu

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/13b588ab-1ed9-4636-85e5-44a24fa1dd01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages