Ansible - Getting Started with Task Execution (Parallelism)
by
Jeremy Canfield |
Updated: November 29 2022
| Ansible articles
Parallelism is the concept of numerous managed nodes executing the tasks in a playbook simultaneously. For example, let's say you have 5 managed nodes defined in your inventory, server1 through server5. The default behavior is that server1 through server5 will go through the tasks in the playbook in parallel (simultaneously). Each tasks in the playbook will be completed on all of the managed nodes before moving onto the next task in the playbook.
This behavior can be adjusted, using the following controls.
- Forks - Set a limit on the number of managed nodes that will processes a playbook simultaneously
- Strategy (debug, free, host_pinned, linear)
- Serial - set a limit on the number or percentage of managed nodes that will process a playbook simultaneously
- Throttle - set a limit on the number of managed nodes that will process a task simultaneously
Did you find this article helpful?
If so, consider buying me a coffee over at