Yes - so shuffle the pool, then use the first host from the pool for the
first task, the second host from the pool for the second task, the third
host from the pool for the third task and so on.
You can either specify the offset in the pool for each successive task, or
slice the pool between tasks
Nop, the idea is to randomize all hosts.
For example,
POOL: host1 host2 host3
I randomize, host2 is chosen
I randomize again, but now host2 cannot be selected.
POOL: host1 host3
I randomize, host1 is chosen
POOL: host3
I randomize, host3 is chosen
Once all hosts are chosen I can start the pool
Are you trying to run the playbook on a list of randomized hosts except
the first and 2nd host?
Maybe you can try
- hosts: "{{ (groups['all'] | shuffle)[2:] }}"
See the following for more details
https://docs.ansible.com/ansible/latest/user_guide/intro_patterns.html
On Wednesday, January 9, 2