Basically I am looking for something like parallel -jX linux command. At any time it runs up to X threads with a command.
I noticed that serial: 2 with any strategy will wait for play to run on these 2 hosts and only after that it will move to the next ones. However, I’d like Ansible to run on 2 hosts at any time, so once it finishes with 1 of 2 in batch, it would already run playbook for the 3rd host.
Is such thing does not exist or I just can’t find how to do it?
I noticed that serial: 2 with any strategy will wait for play to run on
these 2 hosts and only after that it will move to the next ones.
Only "linear" works this way, I think.
I'd like Ansible to run on 2 hosts at any time, so once it finishes with 1
of 2 in batch, it would already run playbook for the 3rd host.
Is such thing does not exist or I just can't find how to do it?
Because of -f 3 Ansible started 3 hosts (1,9,6). Host 1 finished
first and opened it's slot to a new host that was waiting to start.
Host 2 started. The same way host 3 started right after host 6
finished. Host 2, which started after host 9, finished before host 9.
I saw that one, but I misunderstood how that works because I also had
`serial` set in the playbook. Controlling how many tasks are executed
via forks does exactly what I was looking for.