1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

document new 'order' keyword for plays

This commit is contained in:
Brian Coca 2017-05-23 10:55:59 -04:00 committed by Brian Coca
parent 1e1caaad06
commit 70b2ceebe5

View file

@ -229,6 +229,31 @@ Just `Control-C` to kill it and run it again adding the appropriate password.
not come into play. Ansible also takes care to not log password not come into play. Ansible also takes care to not log password
parameters. parameters.
.. _version_added: 2.4
.. _order:
You can also control the order in which hosts are run, the default is to follow the order supplied by the inventory::
- hosts: all
order: sorted
gather_facts: False
tasks:
- debug: var=inventory_hostname
Possible values for order are:
inventory:
The default, the order is 'as provided' by the inventory
reverse_inventory:
As the name implies, this reverses the order 'as provided' by the inventory
sorted:
Hosts are albhabetically sorted by name
reverse_sorted:
Reverse alphabetic ordered
shuffle:
Hosts are randomly ordered each run
.. _tasks_list: .. _tasks_list:
Tasks list Tasks list