Last active
August 18, 2020 15:06
-
-
Save dmi3mis/f4606852618d0d5336023670767124b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for host in master node1 node2 services workstation; do | |
echo "Changing date on ${host} ..." | |
case ${host} in | |
services) | |
sshpass -p redhat ssh -o StrictHostKeyChecking=no root@${host} 'systemctl stop mariadb' | |
;; | |
esac | |
sshpass -p redhat ssh -o StrictHostKeyChecking=no root@${host} 'systemctl disable --now chronyd && timedatectl set-time "2020-07-05 `date +%T`" && reboot' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment