Artem Sidorenko 875c2edc62 Add config option omnibus_url for chef provisioners
This option is useful for internal setups, where own customized
omnibus installation script is used (e.g. to get chef from a mirror)
2017-08-03 10:06:27 +02:00

25 lines
643 B
Ruby

require_relative "../../omnibus"
module VagrantPlugins
module Chef
module Cap
module Redhat
module ChefInstall
def self.chef_install(machine, project, version, channel, omnibus_url, options = {})
machine.communicate.sudo <<-EOH.gsub(/^ {14}/, '')
if command -v dnf; then
dnf -y install curl
else
yum -y install curl
fi
EOH
command = Omnibus.sh_command(project, version, channel, omnibus_url, options)
machine.communicate.sudo(command)
end
end
end
end
end
end