From e4d99a9e0efc4f7998e8e26ae38c7784cfad061f Mon Sep 17 00:00:00 2001 From: Matias Saggiorato Date: Thu, 11 May 2023 11:03:14 -0300 Subject: [PATCH 1/2] Map the hosts to be pointed early --- Vagrantfile | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index e4f402823..e31b391f7 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -229,6 +229,26 @@ vvv_config['hosts'] = vvv_config['hosts'].uniq vvv_config['vagrant-plugins'] = {} unless vvv_config['vagrant-plugins'] +# Early mapping of the hosts to be added. +vvv_config['utilities'].each do |name, extensions| + extensions = {} unless extensions.is_a? Array + extensions.each do |extension| + if extension == 'tideways' + vvv_config['hosts'] += ['tideways.vvv.test'] + vvv_config['hosts'] += ['xhgui.vvv.test'] + end + end +end +vvv_config['extensions'].each do |name, extensions| + extensions = {} unless extensions.is_a? Array + extensions.each do |extension| + if extension == 'tideways' + vvv_config['hosts'] += ['tideways.vvv.test'] + vvv_config['hosts'] += ['xhgui.vvv.test'] + end + end +end + # Create a global variable to use in functions and classes $vvv_config = vvv_config @@ -794,10 +814,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| vvv_config['utilities'].each do |name, extensions| extensions = {} unless extensions.is_a? Array extensions.each do |extension| - if extension == 'tideways' - vvv_config['hosts'] += ['tideways.vvv.test'] - vvv_config['hosts'] += ['xhgui.vvv.test'] - end config.vm.provision "extension-#{name}-#{extension}", type: 'shell', keep_color: true, @@ -812,10 +828,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| vvv_config['extensions'].each do |name, extensions| extensions = {} unless extensions.is_a? Array extensions.each do |extension| - if extension == 'tideways' - vvv_config['hosts'] += ['tideways.vvv.test'] - vvv_config['hosts'] += ['xhgui.vvv.test'] - end config.vm.provision "extension-#{name}-#{extension}", type: 'shell', keep_color: true, From 6d072432a6681d89c1040714fbd4afdfd8f63348 Mon Sep 17 00:00:00 2001 From: Matias Saggiorato Date: Tue, 9 May 2023 14:17:40 -0300 Subject: [PATCH 2/2] Fix docker version detection --- Vagrantfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index e31b391f7..819a39dcc 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -327,6 +327,8 @@ if show_logo provider_version = '??' when 'hyperv' provider_version = 'n/a' + when 'docker' + provider_version = VagrantPlugins::DockerProvider::Driver.new.execute("docker", "-v").gsub("Docker version ", "") else provider_version = '??' end