i'm using multi-machine setup and launching 5 machines, when i type vagrant up
i want the input to be a default value of 1 when i'm asked about it (i don't want to keep typing 1 five times)
Preview of Input options upon typing vagrant up command
here's the vagrant file
IMAGE_NAME = "ubuntu/bionic64"
N = 2
Vagrant.configure("2") do |config|
config.vm.box_check_update = false
# Master Nodes
(1..N).each do |i|
config.vm.define "master-#{i}" do |master|
master.vm.box = IMAGE_NAME
master.vm.hostname = "master-#{i}"
master.vm.network "public_network", ip: "192.168.5.#{i + 10}"
master.vm.network "private_network", ip: "192.168.11.#{i + 10}"
end
end
# Worker Nodes
(1..N).each do |i|
config.vm.define "node-#{i}" do |node|
node.vm.box = IMAGE_NAME
node.vm.hostname = "node-#{i}"
node.vm.network "public_network", ip: "192.168.6.#{i + 10}"
node.vm.network "private_network", ip: "192.168.12.#{i + 10}"
end
end
# Load Balancer
config.vm.define "load-balancer" do |lb|
lb.vm.box = IMAGE_NAME
lb.vm.hostname = "load-balancer"
lb.vm.network "public_network", ip: "192.168.7.11"
lb.vm.network "private_network", ip: "192.168.13.11"
end
end