Commit f830d09d authored by Michal Rostecki's avatar Michal Rostecki

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: 's avatarMichal Rostecki <mrostecki@opensuse.org>
parent feec4457
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}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment