Skip to content

Instantly share code, notes, and snippets.

@byrney
Created November 11, 2015 22:09
Show Gist options
  • Save byrney/31068058bd477b794e51 to your computer and use it in GitHub Desktop.
Save byrney/31068058bd477b794e51 to your computer and use it in GitHub Desktop.
source "https://supermarket.chef.io"
#metadata
cookbook 'windows'
cookbook 'chocolatey'
cookbook 'winbase', path: './winbase'
==> default: default_guard_interpreter :default
==> default: options "--platform=mswin32"
==> default: package_name "win32-api"
==> default: version "1.5.3"
==> default: gem_binary "C:/opscode/chef/embedded/bin/gem"
==> default: declared_type :chef_gem
==> default: cookbook_name :windows
==> default: recipe_name "default"
==> default: end
==> default:
==> default:
==> default: ================================================================================
==> default: Recipe Compile Error in C:\vagrant-chef\871f452a940f3626fce2ad5ebaa33460\cookbooks\winbase\recipes\default.rb
==> default: ================================================================================
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: chef_gem[win32-api] (windows::default line 23) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
==> default: ---- Begin output of C:/opscode/chef/embedded/bin/gem install win32-api -q --no-rdoc --no-ri -v "1.5.3" --platform=mswin32 ----
==> default: STDOUT:
==> default: STDERR: ERROR: Could not find a valid gem 'win32-api' (= 1.5.3), here is why:
==> default:
==> default: Found win32-api (1.5.3), but was for platform universal-mingw32
==> default:
==> default: ERROR: Possible alternatives: win32-api
==> default: ---- End output of C:/opscode/chef/embedded/bin/gem install win32-api -q --no-rdoc --no-ri -v "1.5.3" --platform=mswin32 ----
==> default: Ran C:/opscode/chef/embedded/bin/gem install win32-api -q --no-rdoc --no-ri -v "1.5.3" --platform=mswin32 returned 2
Vagrant.configure(2) do |config|
config.vm.box = "modern81"
config.vm.communicator = "winrm"
config.vm.guest = :windows # guest detection fails: https://github.com/mitchellh/vagrant/pull/4996
config.vm.network :forwarded_port, host_ip: "127.0.0.1", guest: 5985, host: 5985, id: "winrm", auto_correct: true
config.vm.network :forwarded_port, host_ip: "127.0.0.1", guest: 3389, host: 3389, id: "rdp", auto_correct: true
config.vm.provider "virtualbox" do |v|
v.gui = true
v.name = "modern8"
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
end
# config.vm.provision(:shell, path: "../provision/disable-browser-choice.ps1")
# config.vm.provision(:shell, path: "../provision/disable-windows-key.ps1")
# config.vm.provision :shell, path: "../provision/Install-Chocolatey.ps1"
# config.vm.provision :shell, inline: 'cinst -y chef-client'
config.vm.provision "chef_solo" do |chef|
#chef.cookbooks_path = File.expand_path('../chef/chef-repo/cookbooks')
chef.add_recipe 'winbase'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment