core: can specify config.vm.box_download_ca_cert
This commit is contained in:
parent
cd3e19306c
commit
d0f14250d6
|
@ -40,9 +40,12 @@ module Vagrant
|
||||||
|
|
||||||
box_name = env[:machine].config.vm.box
|
box_name = env[:machine].config.vm.box
|
||||||
box_url = env[:machine].config.vm.box_url
|
box_url = env[:machine].config.vm.box_url
|
||||||
|
box_download_ca_cert = env[:machine].config.vm.box_download_ca_cert
|
||||||
box_download_client_cert = env[:machine].config.vm.box_download_client_cert
|
box_download_client_cert = env[:machine].config.vm.box_download_client_cert
|
||||||
box_download_insecure = env[:machine].config.vm.box_download_insecure
|
box_download_insecure = env[:machine].config.vm.box_download_insecure
|
||||||
|
|
||||||
|
# TODO: expand ca cert path relative to root path
|
||||||
|
|
||||||
lock.synchronize do
|
lock.synchronize do
|
||||||
# Check that we don't already have the box, which can happen
|
# Check that we don't already have the box, which can happen
|
||||||
# if we're slow to acquire the lock because of another thread
|
# if we're slow to acquire the lock because of another thread
|
||||||
|
@ -61,6 +64,7 @@ module Vagrant
|
||||||
|
|
||||||
begin
|
begin
|
||||||
env[:action_runner].run(Vagrant::Action.action_box_add, {
|
env[:action_runner].run(Vagrant::Action.action_box_add, {
|
||||||
|
:box_download_ca_cert => box_download_ca_cert,
|
||||||
:box_client_cert => box_download_client_cert,
|
:box_client_cert => box_download_client_cert,
|
||||||
:box_download_insecure => box_download_insecure,
|
:box_download_insecure => box_download_insecure,
|
||||||
:box_name => box_name,
|
:box_name => box_name,
|
||||||
|
|
|
@ -18,6 +18,7 @@ module VagrantPlugins
|
||||||
attr_accessor :boot_timeout
|
attr_accessor :boot_timeout
|
||||||
attr_accessor :box
|
attr_accessor :box
|
||||||
attr_accessor :box_url
|
attr_accessor :box_url
|
||||||
|
attr_accessor :box_download_ca_cert
|
||||||
attr_accessor :box_download_client_cert
|
attr_accessor :box_download_client_cert
|
||||||
attr_accessor :box_download_insecure
|
attr_accessor :box_download_insecure
|
||||||
attr_accessor :graceful_halt_timeout
|
attr_accessor :graceful_halt_timeout
|
||||||
|
@ -28,6 +29,7 @@ module VagrantPlugins
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@boot_timeout = UNSET_VALUE
|
@boot_timeout = UNSET_VALUE
|
||||||
|
@box_download_ca_cert = UNSET_VALUE
|
||||||
@box_download_client_cert = UNSET_VALUE
|
@box_download_client_cert = UNSET_VALUE
|
||||||
@box_download_insecure = UNSET_VALUE
|
@box_download_insecure = UNSET_VALUE
|
||||||
@box_url = UNSET_VALUE
|
@box_url = UNSET_VALUE
|
||||||
|
@ -253,6 +255,7 @@ module VagrantPlugins
|
||||||
def finalize!
|
def finalize!
|
||||||
# Defaults
|
# Defaults
|
||||||
@boot_timeout = 300 if @boot_timeout == UNSET_VALUE
|
@boot_timeout = 300 if @boot_timeout == UNSET_VALUE
|
||||||
|
@box_download_ca_cert = nil if @box_download_ca_cert == UNSET_VALUE
|
||||||
@box_download_client_cert = nil if @box_download_client_cert == UNSET_VALUE
|
@box_download_client_cert = nil if @box_download_client_cert == UNSET_VALUE
|
||||||
@box_download_insecure = false if @box_download_insecure == UNSET_VALUE
|
@box_download_insecure = false if @box_download_insecure == UNSET_VALUE
|
||||||
@box_url = nil if @box_url == UNSET_VALUE
|
@box_url = nil if @box_url == UNSET_VALUE
|
||||||
|
|
Loading…
Reference in New Issue