diff --git a/plugins/provisioners/salt/bootstrap-salt.ps1 b/plugins/provisioners/salt/bootstrap-salt.ps1 index e0bd34d28..d85923a12 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 -force | out-null @@ -13,14 +13,9 @@ 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" + $arch = "x86" } else { $arch = "AMD64" } @@ -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