Last active
March 30, 2023 16:26
-
-
Save eliasp/cd962142e14c34569504 to your computer and use it in GitHub Desktop.
Update SaltStack Minions on Windows
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 characters
export SALTMASTER="salt.dep.institution.tld" | |
export SALTVERSION="2014.7.1-AMD64" | |
export MINIONS="minion-1 minion-2 … minion-n" | |
for MINION in $(echo ${MINIONS}); | |
do | |
salt ${MINION} cp.get_url http://docs.saltstack.com/downloads/Salt-Minion-${SALTVERSION}-Setup.exe 'C:\windows\temp\Salt-Minion-'${SALTVERSION}'-Setup.exe' | |
salt ${MINION} cmd.run shell='powershell' 'C:\windows\temp\Salt-Minion-'${SALTVERSION}'-Setup.exe /S /master='${SALTMASTER}' /minion-name='"${MINION}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
nice script. But I need to change the URL for the Minion to "https://repo.saltstack.com/windows/Salt-Minion-${SALTVERSION}-Setup.exe" to get it running.
Cheers