Skip to content

Instantly share code, notes, and snippets.

@wtnb75
Created February 5, 2014 15:31
Show Gist options
  • Save wtnb75/8826126 to your computer and use it in GitHub Desktop.
Save wtnb75/8826126 to your computer and use it in GitHub Desktop.
multi-node vagrant
boxes = [
["host1", "192.168.3.2"],
["host2", "192.168.3.3"],
]
Vagrant.configure("2") do |config|
config.vm.box = "cent65"
config.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box"
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.auto_detect=true
end
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
boxes.each do |name, ipaddr|
config.vm.define name.to_sym do |cfg|
cfg.vm.network :private_network, ip: ipaddr
cfg.vm.host_name = "%s.local" % name
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment