From d93a2c0e55e7061fd5a419c23f2bd6e8e5547cb3 Mon Sep 17 00:00:00 2001 From: Marno van der Molen Date: Wed, 28 May 2014 11:09:59 +0200 Subject: [PATCH 1/2] Made Salt Minion version to install a variable - ideally Salt would offer a -latest.exe or something for Windows --- plugins/provisioners/salt/bootstrap-salt.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/provisioners/salt/bootstrap-salt.ps1 b/plugins/provisioners/salt/bootstrap-salt.ps1 index 10138281f..f48637577 100644 --- a/plugins/provisioners/salt/bootstrap-salt.ps1 +++ b/plugins/provisioners/salt/bootstrap-salt.ps1 @@ -1,3 +1,6 @@ +# Salt version to install +$version = '2014.1.4' + # Copy minion keys & config to correct location New-Item c:\salt\conf\pki\minion\ -ItemType directory | out-null @@ -22,7 +25,7 @@ if ([IntPtr]::Size -eq 4) { # Download minion setup file Write-Host "Downloading Salt minion installer ($arch)..." $webclient = New-Object System.Net.WebClient -$url = "https://docs.saltstack.com/downloads/Salt-Minion-2014.1.3-1-$arch-Setup.exe" +$url = "https://docs.saltstack.com/downloads/Salt-Minion-$version-$arch-Setup.exe" $file = "C:\tmp\salt.exe" $webclient.DownloadFile($url, $file) From 127ef683e7704123024cbb082066ca69c2f40a41 Mon Sep 17 00:00:00 2001 From: Marno van der Molen Date: Wed, 28 May 2014 15:24:47 +0200 Subject: [PATCH 2/2] make sure C:\tmp\ exists before downloading salt installer --- plugins/provisioners/salt/bootstrap-salt.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/provisioners/salt/bootstrap-salt.ps1 b/plugins/provisioners/salt/bootstrap-salt.ps1 index f48637577..48e95283d 100644 --- a/plugins/provisioners/salt/bootstrap-salt.ps1 +++ b/plugins/provisioners/salt/bootstrap-salt.ps1 @@ -1,8 +1,11 @@ # Salt version to install $version = '2014.1.4' +# Create C:\tmp\ - if Vagrant doesn't upload keys and/or config it might not exist +New-Item C:\tmp\ -ItemType directory | out-null + # Copy minion keys & config to correct location -New-Item c:\salt\conf\pki\minion\ -ItemType directory | out-null +New-Item C:\salt\conf\pki\minion\ -ItemType directory | out-null # Check if minion keys have been uploaded if (Test-Path C:\tmp\minion.pem) {