mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
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 <mrostecki@opensuse.org>
This commit is contained in:
parent
feec44572d
commit
f830d09d6e
4
Vagrantfile
vendored
4
Vagrantfile
vendored
@ -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}"
|
||||
|
Loading…
Reference in New Issue
Block a user