#
Asynchronous Actions
This tutorial explains to you how to use asynchronous actions in Ansible. This tutorial has an example as well.
In Ansible, you can run tasks asynchronously.
Here it is an example:
For this example I want to underline:
async: 200
=> specify that this task must be run asynchronously: the next task will not wait for the completion of this task. This task must not be longer than 200 seconds.poll: 0
=> Ansible check regularly to see if the job is completed. This parameter put on 0 let the next task to run in parallel. If this parameter is 5, the next task is executed after 5 seconds;register: return_result1
=> the result is put in the variable "return_result1".after the first 2 tasks there is a test to see if the first task is accomplished. When the first task is finished, you can go further.