Ansible is ideal for both configuration management, as well as running automated processes on multiple machines. One could easily cook-up their own scripts for such, but ansible will save you the time from trying to rewrite the book on SSH cluster automation.
There is an ansible package available via the EPEL repository. If you haven't already installed the 'epel-release' package, then you should do so now.
yum install epel-release -y
yum install ansible -y
Most people would suggest using your local user and executing the command via sudo. Well, you may not be 'most people', so if you prefer commandeering as root, then I won't judge you.
For those that are bound by the collective 'best practices' borg/hive-mind (or by the dark side of the force), to use sudo, this is for you...
Once you're editing the hosts file, you will want to group the servers accordingly. Some may choose the type of application server to use as a single group (i.e. webservers, dbservers, memservers, etc.). Others may choose the server location as a single group (i.e. usa-servers, russia-servers, china-servers), and others may have a combination of both (i.e. usa-db-servers, usa-web-servers, china-web-servers, china-proxy-servers, etc.).
This allows you to execute commands and 'playbooks' on the machines that you have using individual groups, or globally (all).
In this example, I'll use a mixture of hostname AND IP address references, as both are supported.
[mysqld] db1.mydomain.com db2.myotherdomain.com db3.someotherdomain.com db4.somechineseproxy.com [httpd] 10.10.100.1 10.10.100.2 10.10.100.3 someremoteserver.com aws.ipaywaytoomuchforhosting.com [memcached] 10.10.200.1 10.10.200.2 10.10.200.3
You should now have a working ansible hosts configuration file, with (3) groups of server clusters.
Good job, Einstein! You're a rock star admin now.
Ansible has various modules that can be used to issue commands and execute 'playbooks'. While this article won't get into playbooks or the huge list of modules available, I will cover those at a later time, in separate articles.
ansible httpd -u moo -m shell -a "uptime"
ansible mysqld -u moo -m shell -a "uptime"
ansible memcached -u moo -m shell -a "memcached-tool localhost stats"
So there you have it. Quick and easily up & running with Ansible. This creates a whole new world for command and control of your machines. I'll let your imagination be your guide, and suggest digging into the ansible documentation to explore your new world in depth.