Dear All In an environment , I have 20 centos servers running together . For shutting them down , I need to issue the followings on each of the servers : #./stopServer #init 0 This is cumbersome to try to issue these on huge amount of servers to keep them safely going shutdown. Can you please let me know how can I automate it and say let just one server send stop processes and shutdown commands to the other ones and then goes shutdown himself? Thank you
A simple script which loops though a text file that lists the hostname / username / password for the login and then runs the "shutdown - h now" command? Though, I would be uneasy with listing root passwords in a random text file. On 11/17/2014 12:56 AM, Hadi Motamedi wrote:> Dear All > In an environment , I have 20 centos servers running together . For > shutting them down , I need to issue the followings on each of the > servers : > #./stopServer > #init 0 > This is cumbersome to try to issue these on huge amount of servers to > keep them safely going shutdown. Can you please let me know how can I > automate it and say let just one server send stop processes and > shutdown commands to the other ones and then goes shutdown himself? > Thank you > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos
Am 17.11.2014 um 06:56 schrieb Hadi Motamedi:> Dear All > In an environment , I have 20 centos servers running together . For > shutting them down , I need to issue the followings on each of the > servers : > #./stopServer > #init 0 > This is cumbersome to try to issue these on huge amount of servers to > keep them safely going shutdown. Can you please let me know how can I > automate it and say let just one server send stop processes and > shutdown commands to the other ones and then goes shutdown himself? > Thank youTry out ansible. Using it you can automate many more tasks distributed over your server environment through very simple configurations. It is very flexible and powerful. Alexander