Quantcast
Channel: Blog O' Matty on Prefetch Technologies
Viewing all articles
Browse latest Browse all 43

Controlling the inventory order when running an Ansible playbook

$
0
0
This week I was updating some Ansible application and OS update playbooks. By default, when you run ansible-playbook it will apply your desired configuration to hosts in the order they are listed in the inventory file (or in the order they are returned by a dynamic inventory script). But what if you want to process hosts in a random order? Or by their sorted or reverse sorted names? I recently came across the order option, and was surprised that I didn’t notice this before.

Viewing all articles
Browse latest Browse all 43

Trending Articles