ansible/docs/docsite/rst/plugins/strategy.rst
Toshio Kuratomi 80e7e1a17c
Due to the takeover of freenode we're moving to a different irc network. (#74775)
* Due to the takeover of freenode we're moving to a different irc network.

* Our channels updated to point at the same channel name on libera.chat
* Some links went to webchat.freenode.net.  At this time, libera.chat
  doesn't point you to an official webchat client so I changed these to
  https://libera.chat. (kiwi irc does work with libera.chat so that
  could be another option).
* In general, I used the name irc.libera.net for link names and
  https://libera.chat for link targets.  This is because the irc service
  is hosted on irc.libera.chat but the project web server is hosted on
  libera.chat.  (This appears to also be true for freenode but we were
  using http://irc.freenode.net which doesn't seem to work.  Oops).
* Removed http://irc.freenode.net from the linkcheck exceptions.
  linkcheck was actually correct to flag that as invalid (should have
  been http://frenode.net instead).

* Looks like hte important people in #yaml are now in libera.chat

* Link to where contributors should get help

Add a link target and then link to where contributors should get support
for developing groups of modules.

* Update docs/docsite/rst/dev_guide/developing_modules_in_groups.rst

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: John R Barker <john@johnrbarker.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2021-06-01 08:48:09 +01:00

2.1 KiB

Strategy Plugins

Strategy plugins control the flow of play execution by handling task and host scheduling.

Enabling strategy plugins

All strategy plugins shipped with Ansible are enabled by default. You can enable a custom strategy plugin by putting it in one of the lookup directory sources configured in ansible.cfg <ansible_configuration_settings>.

Using 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 linear <linear_strategy> plugin. You can change this default in Ansible configuration <ansible_configuration_settings> using an environment variable:

export ANSIBLE_STRATEGY=free

or in the ansible.cfg file:

[defaults]
strategy=linear

You can also specify the strategy plugin in the play via the strategy keyword <playbook_keywords> in a play:

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

about_playbooks

An introduction to playbooks

inventory_plugins

Ansible inventory plugins

callback_plugins

Ansible callback plugins

playbooks_filters

Jinja2 filter plugins

playbooks_tests

Jinja2 test plugins

playbooks_lookups

Jinja2 lookup plugins

User Mailing List

Have a question? Stop by the google group!

irc.libera.chat

#ansible IRC chat channel