Created
February 5, 2014 15:31
-
-
Save wtnb75/8826126 to your computer and use it in GitHub Desktop.
multi-node vagrant
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
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