Seth Vargo a90e6cfe4c Use the new Chef installation channel and options
This deprecates "prerelease", which will be removed in the next release.
2015-11-19 14:57:01 -08:00

29 lines
715 B
Ruby

require_relative "../../omnibus"
module VagrantPlugins
module Chef
module Cap
module Redhat
module ChefInstall
def self.chef_install(machine, project, version, channel, options = {})
if dnf?(machine)
machine.communicate.sudo("dnf install -y -q curl")
else
machine.communicate.sudo("yum install -y -q curl")
end
command = Omnibus.sh_command(project, version, channel, options)
machine.communicate.sudo(command)
end
protected
def self.dnf?(machine)
machine.communicate.test("/usr/bin/which -s dnf")
end
end
end
end
end
end