I wrote this script as there a countless times where we need to make changes to hosts and reboot after those changes. Not all of those changes can be done with update manager and hence without a script manual reboot is required, for example, adjusting some kernel or memory limit values.
As this is a real world script, i.e. you don’t want a runaway loop which reboots all your hosts at once, there are many logic checks before it moves on to the next step. If all fails, it will exit the script so that you can fix the issue host(s).
The script will set the host first to maintenance mode, make the changes and reboot the host. Only after that host online will it move on to the next host. Currently, I have only coded for 1 host at a time, so in a large cluster, it make take some time to completed. I hope to have some time to improve on the script to allow nth hosts to be worked on at one time.
You may get it from github here ->