From 2f4a0af5d13e24e2a019130dd6a84ecb10f36b21 Mon Sep 17 00:00:00 2001 From: Jamezz Date: Wed, 4 Mar 2015 18:08:07 -0800 Subject: [PATCH] Fix issue #4152: Salt minion bootstrapping Copy the config after we know the installer exits. Also rev the installed version to 2014.7.1 (latest stable as of 3/4/2015) --- plugins/provisioners/salt/bootstrap-salt.ps1 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/provisioners/salt/bootstrap-salt.ps1 b/plugins/provisioners/salt/bootstrap-salt.ps1 index c8d7e7ab2..1b6d1f6ab 100644 --- a/plugins/provisioners/salt/bootstrap-salt.ps1 +++ b/plugins/provisioners/salt/bootstrap-salt.ps1 @@ -1,5 +1,5 @@ # Salt version to install -$version = '2014.1.10' +$version = '2014.7.1' # Create C:\tmp\ - if Vagrant doesn't upload keys and/or config it might not exist New-Item C:\tmp\ -ItemType directory | out-null @@ -13,11 +13,6 @@ if (Test-Path C:\tmp\minion.pem) { cp C:\tmp\minion.pub C:\salt\conf\pki\minion\ } -# Check if minion config has been uploaded -if (Test-Path C:\tmp\minion) { - cp C:\tmp\minion C:\salt\conf\ -} - # Detect architecture if ([IntPtr]::Size -eq 4) { $arch = "win32" @@ -34,7 +29,13 @@ $webclient.DownloadFile($url, $file) # Install minion silently Write-Host "Installing Salt minion..." -C:\tmp\salt.exe /S +#Wait for process to exit before continuing... +C:\tmp\salt.exe /S | Out-Null + +# Check if minion config has been uploaded +if (Test-Path C:\tmp\minion) { + cp C:\tmp\minion C:\salt\conf\ +} # Wait for salt-minion service to be registered before trying to start it $service = Get-Service salt-minion -ErrorAction SilentlyContinue