Ansible: deploy on multiple hosts in the same time


Is it possible to run ansible playbook, which looks like this (it is an example from this site:

in multithread mode?

I want to run three “includes” in the same time (it is deploying to different hosts anyway)

Is it possible?


I played a long time with things like ls -1 | xargs -P to parallelize my playbooks runs. But to get a prettier display, and simplicity I wrote a simple Python tool to do it, ansible-parallel.

It goes like this:

To answer precisely to the original question (how to run some tasks first, and the rest in parallel), it can be solved by removing the 3 includes and running:

Leave a Reply