Merge pull request #3848 from spuder/patch-3

Installs 64bit chef on windows if available
This commit is contained in:
Rickard von Essen 2016-09-02 22:51:59 +02:00 committed by GitHub
commit 227c6ad6e2
1 changed files with 2 additions and 2 deletions

View File

@ -28,12 +28,12 @@ type guestOSTypeConfig struct {
var guestOSTypeConfigs = map[string]guestOSTypeConfig{ var guestOSTypeConfigs = map[string]guestOSTypeConfig{
provisioner.UnixOSType: guestOSTypeConfig{ provisioner.UnixOSType: guestOSTypeConfig{
executeCommand: "{{if .Sudo}}sudo {{end}}chef-solo --no-color -c {{.ConfigPath}} -j {{.JsonPath}}", executeCommand: "{{if .Sudo}}sudo {{end}}chef-solo --no-color -c {{.ConfigPath}} -j {{.JsonPath}}",
installCommand: "curl -L https://www.chef.io/chef/install.sh | {{if .Sudo}}sudo {{end}}bash", installCommand: "curl -L https://omnitruck.chef.io/install.sh | {{if .Sudo}}sudo {{end}}bash",
stagingDir: "/tmp/packer-chef-client", stagingDir: "/tmp/packer-chef-client",
}, },
provisioner.WindowsOSType: guestOSTypeConfig{ provisioner.WindowsOSType: guestOSTypeConfig{
executeCommand: "c:/opscode/chef/bin/chef-solo.bat --no-color -c {{.ConfigPath}} -j {{.JsonPath}}", executeCommand: "c:/opscode/chef/bin/chef-solo.bat --no-color -c {{.ConfigPath}} -j {{.JsonPath}}",
installCommand: "powershell.exe -Command \"(New-Object System.Net.WebClient).DownloadFile('http://chef.io/chef/install.msi', 'C:\\Windows\\Temp\\chef.msi');Start-Process 'msiexec' -ArgumentList '/qb /i C:\\Windows\\Temp\\chef.msi' -NoNewWindow -Wait\"", installCommand: "powershell.exe -Command \". { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install\"",
stagingDir: "C:/Windows/Temp/packer-chef-client", stagingDir: "C:/Windows/Temp/packer-chef-client",
}, },
} }