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 = {})
|
2016-06-06 22:22:17 +00:00
|
|
|
machine.communicate.sudo <<-EOH.gsub(/^ {14}/, '')
|
|
|
|
if command -v dnf; then
|
|
|
|
dnf -y install curl
|
|
|
|
else
|
|
|
|
yum -y install curl
|
|
|
|
fi
|
|
|
|
EOH
|
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
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|