In 2.0 we added a new way to control play execution,
strategy, by default plays will
still run as they used to, with what we call the
linear strategy. All hosts will run each
task before any host starts the next task, using the number of forks (default 5) to parallelize.
serial directive can ‘batch’ this behaviour to a subset of the hosts, which then run to
completion of the play before the next ‘batch’ starts.
strategy ships with ansible
free, which allows each host to run until the end of
the play as fast as it can.:
- hosts: all strategy: free tasks: ...
The strategies are implemented via a new type of plugin, this means that in the future new execution types can be added, either locally by users or to Ansible itself by a code contribution.