ansible/docs/docsite/rst/plugins/strategy.rst
scottb 6c732bb670 Plugin doc update edits for #30490 (#30889)
* Edit pass 1 for #30490 - command line tools and developing plugins.

* Continuing edit pass for #30490. WIP

* Last round of copy edits for #30490.
2017-09-25 15:37:33 -07:00

71 lines
1.8 KiB
ReStructuredText

.. contents:: Topics
Strategy Plugins
----------------
Strategy plugins control the flow of play execution by handling task and host scheduling.
Enabling Strategy Plugins
+++++++++++++++++++++++++
Only one strategy plugin can be used in a play, but you can use different ones for each play in a playbook or Ansible run.
The default is the :doc:`linear <strategy/linear>` plugin. You can change this default in Ansible :doc:`configuration <../config>` using an environment variable:
.. code-block:: shell
export ANSIBLE_STRATEGY=free
or in the `ansible.cfg` file:
.. code-block:: ini
[defaults]
strategy=linear
You can also specify the strategy plugin in the play via the :ref:`strategy` keyword::
- hosts: all
strategy: debug
tasks:
- copy: src=myhosts dest=/etc/hosts
notify: restart_tomcat
- package: name=tomcat state=present
handlers:
- name: restart_tomcat
service: name=tomcat state=restarted
Plugin List
+++++++++++
You can use ``ansible-doc -t strategy -l`` to see the list of available plugins.
Use ``ansible-doc -t strategy <plugin name>`` to see plugin-specific specific documentation and examples.
.. toctree:: :maxdepth: 1
:glob:
strategy/*
.. seealso::
:doc:`../playbooks`
An introduction to playbooks
:doc:`inventory`
Ansible inventory plugins
:doc:`callback`
Ansible callback plugins
:doc:`../playbooks_filters`
Jinja2 filter plugins
:doc:`../playbooks_tests`
Jinja2 test plugins
:doc:`../playbooks_lookups`
Jinja2 lookup plugins
`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