mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
ReStructuredText
40 lines
1.2 KiB
ReStructuredText
9 years ago
|
Strategies
|
||
9 years ago
|
===========
|
||
|
|
||
7 years ago
|
Strategies are a way to control play execution. By default, plays run with a ``linear`` strategy, in which all hosts will run each task before any host starts the next task, using the number of forks (default 5) to parallelize.
|
||
9 years ago
|
|
||
|
The ``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.
|
||
|
|
||
7 years ago
|
A second ``strategy`` ships with Ansible - ``free`` - which allows each host to run until the end of
|
||
9 years ago
|
the play as fast as it can.::
|
||
|
|
||
|
- hosts: all
|
||
|
strategy: free
|
||
|
tasks:
|
||
|
...
|
||
|
|
||
|
|
||
|
.. _strategy_plugins:
|
||
|
|
||
9 years ago
|
Strategy Plugins
|
||
9 years ago
|
`````````````````
|
||
|
|
||
7 years ago
|
The strategies are implemented as plugins. In the future, new
|
||
|
execution strategies can be added, either locally by users or to Ansible itself by
|
||
9 years ago
|
a code contribution.
|
||
|
|
||
9 years ago
|
One example is ``debug`` strategy. See :doc:`playbooks_debugger` for details.
|
||
|
|
||
9 years ago
|
.. seealso::
|
||
|
|
||
|
:doc:`playbooks`
|
||
|
An introduction to playbooks
|
||
8 years ago
|
:doc:`playbooks_reuse_roles`
|
||
9 years ago
|
Playbook organization by roles
|
||
|
`User Mailing List <http://groups.google.com/group/ansible-devel>`_
|
||
|
Have a question? Stop by the google group!
|
||
|
`irc.freenode.net <http://irc.freenode.net>`_
|
||
|
#ansible IRC chat channel
|
||
|
|