]> git.pld-linux.org Git - packages/vagrant.git/blame - pld-chef-installed.patch
lib/pre-rubygems.rb is gone
[packages/vagrant.git] / pld-chef-installed.patch
CommitLineData
865f5efe
ER
1upstream rejects this
2
3https://github.com/mitchellh/vagrant/pull/6173
4
27c6553b
ER
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
58e22970 7@@ -73,6 +73,16 @@
27c6553b
ER
8 Cap::Redhat::ChefInstall
9 end
10
11+ guest_capability(:pld, :chef_install) do
12+ require_relative "cap/pld/chef_install"
13+ Cap::PLD::ChefInstall
14+ end
15+
28281fb4
ER
16+ guest_capability(:pld, :chef_installed) do
17+ require_relative "cap/pld/chef_installed"
168102bd 18+ Cap::PLD::ChefInstalled
28281fb4
ER
19+ end
20+
58e22970
JR
21 guest_capability(:suse, :chef_install) do
22 require_relative "cap/suse/chef_install"
23 Cap::Suse::ChefInstall
28281fb4
ER
24--- /dev/null 2015-05-25 21:49:42.000000000 +0300
25+++ vagrant-1.7.4/plugins/provisioners/chef/cap/pld/chef_installed.rb 2015-08-19 17:02:22.571070868 +0300
26@@ -0,0 +1,22 @@
27+module VagrantPlugins
28+ module Chef
29+ module Cap
30+ module PLD
3353e2a3 31+ module ChefInstalled
28281fb4
ER
32+ # Check if Chef is installed at the given version.
33+ # @return [true, false]
34+ def self.chef_installed(machine, version)
3353e2a3 35+ knife = "/usr/bin/chef-client"
28281fb4 36+ command = "test -x #{knife}"
3353e2a3 37+
28281fb4
ER
38+ if version != :latest
39+ command << "&& #{knife} --version | grep 'Chef: #{version}'"
40+ end
41+
3353e2a3 42+ machine.communicate.test(command, sudo: true)
28281fb4
ER
43+ end
44+ end
45+ end
46+ end
47+ end
48+end
27c6553b
ER
49--- /dev/null 2015-05-25 21:49:42.000000000 +0300
50+++ vagrant-1.7.4/plugins/provisioners/chef/cap/pld/chef_install.rb 2015-08-19 17:27:55.925638979 +0300
51@@ -0,0 +1,18 @@
52+require_relative "../../omnibus"
53+
54+module VagrantPlugins
55+ module Chef
56+ module Cap
57+ module PLD
58+ module ChefInstall
59+ def self.chef_install(machine, version, prerelease, download_path)
60+ machine.communicate.sudo("poldek --up && poldek -u chef --noask")
61+
62+ command = Omnibus.build_command(version, prerelease, download_path)
63+ machine.communicate.sudo(command)
64+ end
65+ end
66+ end
67+ end
68+ end
69+end
This page took 0.085871 seconds and 4 git commands to generate.