FreeKB - Ansible forks in ansible.cfg (Parallelism)
Ansible - forks in ansible.cfg (Parallelism)

Forks determines how many managed nodes (e.g. the target systems) a task will be run against simultaneously. For a better understanding of forks, refer to Ansible - Understanding Forks.

By default, the forks directive in ansible.cfg is set to use 5 forks.

forks = 5

 

Command line option -f or --forks can be used to specify the number of fork, which will take precedence over the forks directive in ansible.cfg. In this example, forks is set to 10, so that each task in the playbook is executed against 10 managed nodes simultaneously.

ansible-playbook example.yml --forks 10

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 6299e in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |