fkx1xg
Last Updated: February 25, 2016
·
831
· k4ml
Dab3052b18c86b0884341d9c2c67a4f3

Quickly run command on multiple servers using ansible

One example use case of ansible for sysadmin. Quickly run command on multiple servers:-

ansible all -i server1.com,server2.com, -a 'dig +short www.google.com'
server1.com | success | rc=0 >>
74.125.135.106
74.125.135.147
74.125.135.99
74.125.135.103
74.125.135.104
74.125.135.105

server2.com | success | rc=0 >>
74.125.135.147
74.125.135.99
74.125.135.103
74.125.135.104
74.125.135.105
74.125.135.106

Above will check dns entry for www.google.com from server1.com and server2.com.

Say Thanks
Respond
Filed Under