Last active
February 11, 2016 18:54
-
-
Save leonmax/7e6c754e294c9cce4f8f to your computer and use it in GitHub Desktop.
This file contains 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 : | |
boxes = [{ | |
:name => "luffy", | |
:eth1 => "192.168.88.10", | |
}, { | |
:name => "zoro", | |
:eth1 => "192.168.88.11", | |
}, { | |
:name => "sanji", | |
:eth1 => "192.168.88.12", | |
}, { | |
:name => "nami", | |
:eth1 => "192.168.88.13", | |
}, { | |
:name => "robin", | |
:eth1 => "192.168.88.14", | |
}] | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/precise64" | |
# Turn off shared folders | |
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true | |
boxes.each do |opts| | |
config.vm.define opts[:name] do |node| | |
node.vm.hostname = opts[:name] | |
node.vm.provider "virtualbox" do |vb| | |
vb.memory = opts[:mem] || "1024" | |
vb.cpus = opts[:cpu] || "1" | |
end | |
node.vm.network :public_network, ip: opts[:eth1], bridge: "en1: Wi-Fi (AirPort)" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment