Sobes.tech
Junior

How many hosts does Ansible allow to run scripts simultaneously by default?

sobes.tech AI

Answer from AI

By default, Ansible can run scripts simultaneously on 5 hosts. This value is determined by the forks parameter in the ansible.cfg configuration file or when calling from the command line.

# Example of changing the forks value in ansible.cfg
[defaults]
forks = 10  # Increase to 10 parallel threads

When running from the command line:

ansible-playbook my_playbook.yml -f 20  # Run with 20 parallel threads