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