2013-03-27 19:29:21 +00:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
2014-03-18 01:07:43 +00:00
|
|
|
if Gem::Version.new(::Vagrant::VERSION) < Gem::Version.new('1.5')
|
|
|
|
Vagrant.require_plugin('vagrant-hostmanager')
|
|
|
|
end
|
2013-04-04 19:23:55 +00:00
|
|
|
|
2013-03-27 19:29:21 +00:00
|
|
|
Vagrant.configure('2') do |config|
|
2014-03-18 01:13:41 +00:00
|
|
|
|
|
|
|
if ENV.key? 'VAGRANT_BOX'
|
|
|
|
config.vm.box = ENV['VAGRANT_BOX']
|
|
|
|
else
|
|
|
|
config.vm.box = 'precise64'
|
|
|
|
config.vm.box_url = 'http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-vagrant-amd64-disk1.box'
|
|
|
|
end
|
2013-03-27 19:29:21 +00:00
|
|
|
|
2013-04-27 12:10:45 +00:00
|
|
|
config.hostmanager.enabled = true
|
2013-06-18 21:26:29 +00:00
|
|
|
config.hostmanager.manage_host = true
|
2014-11-14 20:42:54 +00:00
|
|
|
config.hostmanager.manage_guest = true
|
2013-04-08 17:20:22 +00:00
|
|
|
|
2013-03-27 19:29:21 +00:00
|
|
|
config.vm.define :server1 do |server|
|
|
|
|
server.vm.hostname = 'fry'
|
|
|
|
server.vm.network :private_network, :ip => '10.0.5.2'
|
2013-06-18 21:26:29 +00:00
|
|
|
server.hostmanager.aliases = %w(test-alias)
|
2013-03-27 19:29:21 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
config.vm.define :server2 do |server|
|
|
|
|
server.vm.hostname = 'bender'
|
|
|
|
server.vm.network :private_network, :ip => '10.0.5.3'
|
|
|
|
end
|
2014-03-18 01:11:02 +00:00
|
|
|
|
|
|
|
config.vm.define :server3 do |server|
|
|
|
|
server.vm.hostname = 'leena'
|
|
|
|
server.vm.network :private_network, :ip => '10.0.5.4'
|
|
|
|
server.vm.provision :hostmanager
|
|
|
|
end
|
2014-04-01 06:04:56 +00:00
|
|
|
|
|
|
|
config.vm.define :server4 do |server|
|
|
|
|
server.vm.hostname = 'scruffy'
|
|
|
|
server.vm.provision :hostmanager
|
|
|
|
end
|
|
|
|
end
|