2014-10-31 20:06:05 +00:00
|
|
|
require_relative "../../omnibus"
|
|
|
|
|
|
|
|
module VagrantPlugins
|
|
|
|
module Chef
|
|
|
|
module Cap
|
|
|
|
module Redhat
|
|
|
|
module ChefInstall
|
2015-11-19 22:57:01 +00:00
|
|
|
def self.chef_install(machine, project, version, channel, options = {})
|
2015-09-20 07:30:49 +00:00
|
|
|
if dnf?(machine)
|
|
|
|
machine.communicate.sudo("dnf install -y -q curl")
|
|
|
|
else
|
|
|
|
machine.communicate.sudo("yum install -y -q curl")
|
|
|
|
end
|
2014-10-31 20:06:05 +00:00
|
|
|
|
2015-11-19 22:57:01 +00:00
|
|
|
command = Omnibus.sh_command(project, version, channel, options)
|
2014-10-31 20:06:05 +00:00
|
|
|
machine.communicate.sudo(command)
|
|
|
|
end
|
2015-09-20 07:30:49 +00:00
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def self.dnf?(machine)
|
|
|
|
machine.communicate.test("/usr/bin/which -s dnf")
|
|
|
|
end
|
2014-10-31 20:06:05 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|