-
Notifications
You must be signed in to change notification settings - Fork 14
/
Vagrantfile
41 lines (33 loc) · 1.16 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# stripped down example piab Vagrantfile for rouster
boxes = {
:ppm => {
:box_name => 'centos6',
:box_url => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210.box',
},
:app => {
:box_name => 'centos6',
:box_url => 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210.box',
},
:ubuntu12 => {
:box_name => 'ubuntu12',
:box_url => 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210.box',
},
:ubuntu13 => {
:box_name => 'ubuntu13',
:box_url => 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-1310-x64-virtualbox-puppet.box',
},
}
Vagrant::Config.run do |config|
boxes.each_pair do |box,hash|
config.vm.define box do |worker|
worker.vm.box = hash[:box_name]
worker.vm.box_url = hash[:box_url]
worker.vm.host_name = hash[:box_name]
worker.vm.network :hostonly, sprintf('10.0.1.%s', rand(253).to_i + 2)
worker.ssh.forward_agent = true
if box.to_s.eql?('ppm') and File.directory?('../puppet')
worker.vm.share_folder('puppet', '/etc/puppet/', '../puppet/')
end
end
end
end