Skip to content

Instantly share code, notes, and snippets.

@eliasp
Last active March 30, 2023 16:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliasp/cd962142e14c34569504 to your computer and use it in GitHub Desktop.
Save eliasp/cd962142e14c34569504 to your computer and use it in GitHub Desktop.
Update SaltStack Minions on Windows
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
@Cuprax
Copy link

Cuprax commented Oct 14, 2016

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

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