-
Notifications
You must be signed in to change notification settings - Fork 263
Install Salt using Salt bootstrap script #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -139,39 +139,20 @@ goto exit0 | |
| :salt | ||
| :::::::::::: | ||
|
|
||
| if "%CM_VERSION%" == "latest" set CM_VERSION=2015.8.8-2 | ||
|
|
||
| if not defined SALT_64_URL set SALT_64_URL=https://repo.saltstack.com/windows/Salt-Minion-%CM_VERSION%-AMD64-Setup.exe | ||
| if not defined SALT_32_URL set SALT_32_URL=https://repo.saltstack.com/windows/Salt-Minion-%CM_VERSION%-x86-Setup.exe | ||
|
|
||
| if defined ProgramFiles(x86) ( | ||
| set SALT_URL=%SALT_64_URL% | ||
| ) else ( | ||
| set SALT_URL=%SALT_32_URL% | ||
| ) | ||
|
|
||
| for %%i in ("%SALT_URL%") do set SALT_EXE=%%~nxi | ||
| set SALT_DIR=%TEMP%\salt | ||
| set SALT_PATH=%SALT_DIR%\%SALT_EXE% | ||
|
|
||
| echo ==^> Creating "%SALT_DIR%" | ||
| mkdir "%SALT_DIR%" | ||
| pushd "%SALT_DIR%" | ||
|
|
||
| if exist "%SystemRoot%\_download.cmd" ( | ||
| call "%SystemRoot%\_download.cmd" "%SALT_URL%" "%SALT_PATH%" | ||
| ) else ( | ||
| echo ==^> Downloading %SALT_URL% to %SALT_PATH% | ||
| powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%SALT_URL%', '%SALT_PATH%')" <NUL | ||
| ) | ||
| set SALT_URL=https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.ps1 | ||
| set SALT_PATH=%SALT_DIR%\bootstrap-salt.ps1 | ||
| echo ==^> Downloading %SALT_URL% to %SALT_PATH% | ||
| powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%SALT_URL%', '%SALT_PATH%')" <NUL | ||
|
|
||
| if not exist "%SALT_PATH%" goto exit1 | ||
|
|
||
| echo ==^> Installing Salt minion | ||
| :: see http://docs.saltstack.com/en/latest/topics/installation/windows.html | ||
| "%SALT_PATH%" /S %SALT_OPTIONS% | ||
|
|
||
| @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: "%SALT_PATH%" /S %SALT_OPTIONS% | ||
| ver>nul | ||
| powershell "%SALT_PATH%" %CM_OPTIONS% | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we include the I think to avoid needing a conditional for the case of an undefined |
||
|
|
||
| goto exit0 | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the comment in the review for
script/cmtool.bat. I think we might be able to still preserve the functionality of allowing the user to set the salt version viaCM_VERSION.