Created
December 18, 2012 14:38
-
-
Save cwood/4328540 to your computer and use it in GitHub Desktop.
Revisions
-
cwood created this gist
Dec 18, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/bin/bash SALTMINIONS=$(sudo salt-key -L | grep -v "Rejected:" | grep -v "Accepted Keys:" | grep -v "Unaccepted Keys:") echo -n "Remote hosts [sudo] password: " read -s remote_password echo for minion in $SALTMINIONS do echo "Connecting to $minion ... " ssh -tt $minion "echo \"$remote_password\" | sudo -S -p '' /etc/init.d/salt-minion restart" echo done