From 30461a9a090e1772f408b22e698cb53bbcbff63d Mon Sep 17 00:00:00 2001 From: Ali Rizvi-Santiago Date: Wed, 15 Jul 2020 21:13:38 -0500 Subject: [PATCH 1/2] Revert "Updated script/cmtool.bat to patch the downloaded installer for salt-bootstrap in order to fix issue saltstack/salt-bootstrap#1406." This reverts commit 9645c5963291b8379acf75f72a07715b14af4ce8. --- script/cmtool.bat | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/script/cmtool.bat b/script/cmtool.bat index f053000b..59399af1 100644 --- a/script/cmtool.bat +++ b/script/cmtool.bat @@ -258,20 +258,13 @@ if "%PlatformVersionMajor%" == "6" if "%PlatformVersionMinor%" == "1" goto saltr :saltbootstrap :::::::::::: -:: We hardcode the CM_VERSION here to workaround saltstack/salt-bootstrap#1394 -if "%CM_VERSION%" == "latest" set CM_VERSION=2019.2.2 - set SALT_URL=http://raw.githubusercontent.com/saltstack/salt-bootstrap/%SALT_REVISION%/bootstrap-salt.ps1 - set SALT_PATH=%SALT_DIR%\bootstrap-salt.ps1 -set SALT_DOWNLOAD=%SALT_DIR%\bootstrap-salt.download.ps1 -echo ==^> Downloading %SALT_URL% to %SALT_DOWNLOAD% -powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%SALT_URL%', '%SALT_DOWNLOAD%')" Downloading %SALT_URL% to %SALT_PATH% +powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%SALT_URL%', '%SALT_PATH%')" Patching bootstrap-salt.ps1 at %SALT_DOWNLOAD% -powershell -command "(get-content \"%SALT_DOWNLOAD%\") -replace \"'Tls,Tls11,Tls12'\", \"0xc0,0x300,0xc00\" | set-content \"%SALT_PATH%\"" +if not exist "%SALT_PATH%" goto exit1 echo ==^> Installing Salt minion with %SALT_PATH% if "%CM_VERSION%" == "latest" ( From ef482a897a72e6e93dd8ce043f5222878fd67a6f Mon Sep 17 00:00:00 2001 From: Ali Rizvi-Santiago Date: Thu, 16 Jul 2020 00:41:49 -0500 Subject: [PATCH 2/2] Demoted the log in `script/cmtool.bat` when setting the default value for the "CM_VERSION" environment variable. --- script/cmtool.bat | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/script/cmtool.bat b/script/cmtool.bat index 59399af1..bce0433b 100644 --- a/script/cmtool.bat +++ b/script/cmtool.bat @@ -26,12 +26,19 @@ echo ==^> Detected Windows Platform Version: %PlatformVersionMajor%.%PlatformVer if not defined TEMP set TEMP=%LOCALAPPDATA%\Temp :: Figure out which configuration management tool to use -if not defined CM echo ==^> ERROR: The "CM" variable was not found in the environment & goto exit1 +if not defined CM ( + echo ==^> ERROR: The "CM" variable was not found in the environment + goto exit1 +) + if "%CM%" == "nocm" goto nocm if not defined CM_VERSION ( - echo ==^> ERROR: The "CM_VERSION" variable was not found in the environment + echo ==^> Using default value of "latest" for the "CM_VERSION" environment variable set CM_VERSION=latest + +) else ( + echo ==^> Found the value "%CM_VERSION%" in the "CM_VERSION" environment variable ) if "%CM%" == "chef" goto omnitruck