i would like to find a program that maintains a list of commands that can be aliased for different hosts. for example, we have a database server, and four web servers. a common task is to login to the admin server and restart mysql using
# ssh dbserver "service mysql restart"
then we restart each of the web servers by running
# ssh webserver1 "service apache2 restart"
# ssh webserver2 "service apache2 restart"
# ssh webserver3 "service apache2 restart"
# ssh webserver4 "service apache2 restart"
I would like to have an package that keeps track of these commands and i could run them as such:
# blah dbserver,webserver1-4 "restartServices"
then it would loop through each host listed and run the commands necessary to restart the services on those boxes.