FreeKB - Ansible --forks command line option
Ansible - --forks command line option

Let's say you want to use Ansible to do something against a large number of managed nodes (e.g. target systems), such as 100 managed nodes. By default, Ansible will create 5 forks, which means that Ansible will perform a task against 5 managed nodes, then the next 5 managed nodes, and so on, until the tasks has been completed against all of the managed nodes. In Ansible terminology, this is known as parallelism.

Command line option -f or --forks can be used to specify the number of fork, like this.

ansible-playbook playbook.yml --forks 25

 

Or, you could define the default number of forks in ansible.cfg.

forks = 25

 



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 a6e0d 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   |