3 https://github.com/mitchellh/vagrant/pull/6173
5 --- vagrant-1.7.4/plugins/provisioners/chef/plugin.rb 2015-08-19 17:03:47.474659244 +0300
6 +++ vagrant-1.7.4/plugins/provisioners/chef/plugin.rb 2015-08-19 17:28:22.723434523 +0300
8 Cap::Redhat::ChefInstall
11 + guest_capability(:pld, :chef_install) do
12 + require_relative "cap/pld/chef_install"
13 + Cap::PLD::ChefInstall
16 guest_capability(:omnios, :chef_installed) do
17 require_relative "cap/omnios/chef_installed"
18 Cap::OmniOS::ChefInstalled
21 + guest_capability(:pld, :chef_installed) do
22 + require_relative "cap/pld/chef_installed"
23 + Cap::PLD::ChefInstalled
26 guest_capability(:omnios, :chef_install) do
27 require_relative "cap/omnios/chef_install"
28 Cap::OmniOS::ChefInstall
29 --- /dev/null 2015-05-25 21:49:42.000000000 +0300
30 +++ vagrant-1.7.4/plugins/provisioners/chef/cap/pld/chef_installed.rb 2015-08-19 17:02:22.571070868 +0300
32 +module VagrantPlugins
36 + module ChefInstalled
37 + # Check if Chef is installed at the given version.
38 + # @return [true, false]
39 + def self.chef_installed(machine, version)
40 + knife = "/usr/bin/chef-client"
41 + command = "test -x #{knife}"
43 + if version != :latest
44 + command << "&& #{knife} --version | grep 'Chef: #{version}'"
47 + machine.communicate.test(command, sudo: true)
54 --- /dev/null 2015-05-25 21:49:42.000000000 +0300
55 +++ vagrant-1.7.4/plugins/provisioners/chef/cap/pld/chef_install.rb 2015-08-19 17:27:55.925638979 +0300
57 +require_relative "../../omnibus"
59 +module VagrantPlugins
64 + def self.chef_install(machine, version, prerelease, download_path)
65 + machine.communicate.sudo("poldek --up && poldek -u chef --noask")
67 + command = Omnibus.build_command(version, prerelease, download_path)
68 + machine.communicate.sudo(command)