Run tasks concurrently: poll = 0
If you want to run multiple tasks in a playbook concurrently, useasyncwithpollset to 0. When you setpoll:0, Ansible starts the task and immediately moves on to the next task without waiting for a result. Each async task runs until it either completes, fails or times out (runs longer than itsasyncvalue). The playbook run ends without checking back on async tasks.
To run a playbook task asynchronously:
If you need a synchronization point with an async task, you can register it to obtain its job ID and use theasync_statusmodule to observe it in a later task. For example:
To run multiple asynchronous tasks while limiting the number of tasks running concurrently: