With Vagrant, I aim to have three master and two node machines on my Ubuntu host.
My Vagrantfile:
Vagrant.configure("2") do |config|
config.ssh.insert_key = false
(1..3).each do |i|
config.vm.define "master" do |master|
master.vm.box = "ubuntu/bionic64"
end
end
(1..2).each do |i|
config.vm.define "node" do |node|
node.vm.box = "ubuntu/bionic64"
end
end
config.vm.network "public_network"
config.vm.provider "virtualbox" do |vb|
vb.memory = "3072"
vb.cpus = "3"
end
end
I have after vagrant up:
$ vagrant status
Current machine states:
master running (virtualbox)
node running (virtualbox)
Why did the loop fail?