Merge pull request #5437 from Jamezz/master

Fix issue #4152: Salt minion bootstrapping
This commit is contained in:
Seth Vargo 2015-05-31 20:08:32 -07:00
commit f5c77765fa
1 changed files with 9 additions and 8 deletions

View File

@ -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