Ansible

Various helpful commands to run against a group of hosts

> ansible-playbook -i inv site.yml --limit 'dev:&db' ...
# By default ansible does a logical OR when you give
# it multiple host groups. :& uses AND instead

# Reboot servers
> ansible safe -i inv -m reboot -kK -b
# Assumes a list of servers in inv, and a group "safe"

Links