Skip to content

Instantly share code, notes, and snippets.

@leonmax
Last active February 11, 2016 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leonmax/7e6c754e294c9cce4f8f to your computer and use it in GitHub Desktop.
Save leonmax/7e6c754e294c9cce4f8f to your computer and use it in GitHub Desktop.
# -*- 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