Merge pull request #6806 from gimler/chef_suse

add chef installer for suse
This commit is contained in:
Seth Vargo 2016-01-25 13:55:24 -05:00
commit a524fc83ae
2 changed files with 32 additions and 0 deletions

View File

@ -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

View File

@ -78,6 +78,11 @@ module VagrantPlugins
Cap::Redhat::ChefInstall
end
guest_capability(:suse, :chef_install) do
require_relative "cap/suse/chef_install"
Cap::Suse::ChefInstall
end
guest_capability(:windows, :chef_install) do
require_relative "cap/windows/chef_install"
Cap::Windows::ChefInstall