Created
October 24, 2020 19:24
-
-
Save farwydi/ca5bb1e0373179d2cb02fec13a6a7a95 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# # vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = $box | |
(1..$num_instances).each do |i| | |
config.vm.define vm_name = "%s-%01d" % [$instance_name_prefix, i] do |node| | |
node.vm.hostname = vm_name | |
node.vm.provider :virtualbox do |vb| | |
vb.memory = $vm_memory | |
vb.cpus = $vm_cpus | |
vb.gui = $vm_gui | |
vb.linked_clone = true | |
vb.customize ["modifyvm", :id, "--vram", "8"] | |
end | |
ip = "#{$subnet}.#{i+100}" | |
node.vm.network :private_network, ip: ip | |
node.vm.provision "shell", inline: "swapoff -a" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment