pass the `download_path` parameter to the `:chef_install` capability so it is available when `Omnibus.build_command(..)` is invoked
This commit is contained in:
parent
d7bd65b4e2
commit
acc4e3806f
|
@ -5,11 +5,11 @@ module VagrantPlugins
|
|||
module Cap
|
||||
module Debian
|
||||
module ChefInstall
|
||||
def self.chef_install(machine, version, prerelease)
|
||||
def self.chef_install(machine, version, prerelease, download_path)
|
||||
machine.communicate.sudo("apt-get update -y -qq")
|
||||
machine.communicate.sudo("apt-get install -y -qq curl")
|
||||
|
||||
command = Omnibus.build_command(version, prerelease)
|
||||
command = Omnibus.build_command(version, prerelease, download_path)
|
||||
machine.communicate.sudo(command)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,10 +5,10 @@ module VagrantPlugins
|
|||
module Cap
|
||||
module Redhat
|
||||
module ChefInstall
|
||||
def self.chef_install(machine, version, prerelease)
|
||||
def self.chef_install(machine, version, prerelease, download_path)
|
||||
machine.communicate.sudo("yum install -y -q curl")
|
||||
|
||||
command = Omnibus.build_command(version, prerelease)
|
||||
command = Omnibus.build_command(version, prerelease, download_path)
|
||||
machine.communicate.sudo(command)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,6 +6,7 @@ module VagrantPlugins
|
|||
@version = options.fetch(:version, :latest)
|
||||
@prerelease = options.fetch(:prerelease, :latest)
|
||||
@force = options.fetch(:force, false)
|
||||
@download_path = options.fetch(:download_path, nil)
|
||||
end
|
||||
|
||||
# This handles verifying the Chef installation, installing it if it was
|
||||
|
@ -27,7 +28,7 @@ module VagrantPlugins
|
|||
|
||||
@machine.ui.detail(I18n.t("vagrant.chef_installing",
|
||||
version: @version.to_s))
|
||||
@machine.guest.capability(:chef_install, @version, @prerelease)
|
||||
@machine.guest.capability(:chef_install, @version, @prerelease, @download_path)
|
||||
|
||||
if !@machine.guest.capability(:chef_installed, @version)
|
||||
raise Provisioner::Base::ChefError, :install_failed
|
||||
|
|
Loading…
Reference in New Issue