From f830d09d6e5055b1b95f8ed45836bb7ca4271d02 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Tue, 7 Sep 2021 14:18:26 +0200 Subject: [PATCH] vagrant: Change OS environment variable to DISTRO On many Linux distributions (including openSUSE) the OS env variable is already used with value "Linux". This results in weird errors like: ==> .1: Box 'generic/Linux' could not be found. Attempting to find and install... To avoid the conflict, use the more neutral and less likely to be taken DISTRO variable. Signed-off-by: Michal Rostecki --- Vagrantfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index da0081105a..01f884c39b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,4 +1,4 @@ -OS = (ENV['OS'] || "alpine312") +DISTRO = (ENV['DISTRO'] || "alpine312") BOX_REPO = (ENV['BOX_REPO'] || "generic") HOME = ENV['HOME'] PROJ_HOME = File.dirname(__FILE__) @@ -17,7 +17,7 @@ MOUNT_TYPE = ENV['MOUNT_TYPE'] || "virtualbox" # --- May need to add terminal to System Preferences -> Security & Privacy -> Privacy -> Full Disk Access def provision(vm, node_num) - node_os = (ENV["OS_#{node_num}"] || OS) + node_os = (ENV["DISTRO_#{node_num}"] || DISTRO) vm.box = (ENV["BOX_#{node_num}"] || ENV["BOX"] || "#{BOX_REPO}/#{node_os}") vm.hostname = "#{PROJECT}-#{node_num}-#{vm.box.gsub(/^.*\//,"")}" vm.network "private_network", ip: "#{NETWORK_PREFIX}.#{100+node_num}"