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)
This commit is contained in:
parent
a8dcf92f14
commit
2f4a0af5d1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue