Skip to content

Instantly share code, notes, and snippets.

@kksudo
Created September 23, 2021 15:19
Show Gist options
  • Save kksudo/41ab4453653b3817cf1e1b63b727b112 to your computer and use it in GitHub Desktop.
Save kksudo/41ab4453653b3817cf1e1b63b727b112 to your computer and use it in GitHub Desktop.
FIx the salt minion, when the master key on the salt-master changed
#!/bin/bash
invoke-rc.d salt-minion stop && \
rm -rf /etc/salt/pki/* && \
invoke-rc.d salt-minion start
printf "\nminion %s restarted\n" $(cat /etc/salt/minion_id)
@kksudo
Copy link
Author

kksudo commented Sep 23, 2021

wget uri -P /path/to/folder
chmod +x /path/to/folder/fix-salt-keys.sh
sh /path/to/folder/fix-salt-keys.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment