2016-01-05 14:30:05 +00:00
|
|
|
require_relative "../../omnibus"
|
|
|
|
|
|
|
|
module VagrantPlugins
|
|
|
|
module Chef
|
|
|
|
module Cap
|
|
|
|
module Suse
|
|
|
|
module ChefInstall
|
2017-06-14 10:34:52 +00:00
|
|
|
def self.chef_install(machine, project, version, channel, omnibus_url, options = {})
|
2016-01-05 14:30:05 +00:00
|
|
|
unless curl?(machine)
|
|
|
|
machine.communicate.sudo("zypper -n -q update")
|
|
|
|
machine.communicate.sudo("zypper -n -q install curl")
|
|
|
|
end
|
|
|
|
|
2017-06-14 10:34:52 +00:00
|
|
|
command = Omnibus.sh_command(project, version, channel, omnibus_url, options)
|
2016-01-05 14:30:05 +00:00
|
|
|
machine.communicate.sudo(command)
|
|
|
|
end
|
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def self.curl?(machine)
|
|
|
|
machine.communicate.test("/usr/bin/which -s curl")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|