Hello All,
I currently have a YAML playbook that is used to restart all servers in a specific environment. There are 2, sometimes 3 groups of hosts depending on the environment. My goal is to have the primary host in each group restart first and once this is done, it can proceed to restart the rest of the nodes. We want this done two nodes at a time and are specifying serial:2 for this purpose. We are using Order: Inventory, which is the default for this.
In one environment with two groups and four hosts, the inventory is ordered:
host101
host201
host102
host202.
When the playbook runs, it executes the play in the order they are listed in inventory, as expected.
In another environment, we have 3 groups of hosts, 7 nodes total. Even though the inventory is ordered as follows:
host101
host201
host301
host102
host103
host104
host202
However when the playbook runs in this environment, it reboots the hosts in numerical order every time instead of as they are ordered in inventory.
The following is the playbook being used, with company specific details replaced the second play, which checks that a specific application site is up, can be ignored: