Merge pull request #6806 from gimler/chef_suse
add chef installer for suse
This commit is contained in:
commit
a524fc83ae
|
@ -0,0 +1,27 @@
|
||||||
|
require_relative "../../omnibus"
|
||||||
|
|
||||||
|
module VagrantPlugins
|
||||||
|
module Chef
|
||||||
|
module Cap
|
||||||
|
module Suse
|
||||||
|
module ChefInstall
|
||||||
|
def self.chef_install(machine, project, version, channel, options = {})
|
||||||
|
unless curl?(machine)
|
||||||
|
machine.communicate.sudo("zypper -n -q update")
|
||||||
|
machine.communicate.sudo("zypper -n -q install curl")
|
||||||
|
end
|
||||||
|
|
||||||
|
command = Omnibus.sh_command(project, version, channel, options)
|
||||||
|
machine.communicate.sudo(command)
|
||||||
|
end
|
||||||
|
|
||||||
|
protected
|
||||||
|
|
||||||
|
def self.curl?(machine)
|
||||||
|
machine.communicate.test("/usr/bin/which -s curl")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -78,6 +78,11 @@ module VagrantPlugins
|
||||||
Cap::Redhat::ChefInstall
|
Cap::Redhat::ChefInstall
|
||||||
end
|
end
|
||||||
|
|
||||||
|
guest_capability(:suse, :chef_install) do
|
||||||
|
require_relative "cap/suse/chef_install"
|
||||||
|
Cap::Suse::ChefInstall
|
||||||
|
end
|
||||||
|
|
||||||
guest_capability(:windows, :chef_install) do
|
guest_capability(:windows, :chef_install) do
|
||||||
require_relative "cap/windows/chef_install"
|
require_relative "cap/windows/chef_install"
|
||||||
Cap::Windows::ChefInstall
|
Cap::Windows::ChefInstall
|
||||||
|
|
Loading…
Reference in New Issue