blob: 29e737840f2d2c4e4c3162675531eaefe4e6937a (
plain)
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
42
43
44
45
46
47
48
|
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "wheezy"
# Shell provisioner to keep the system updated.
config.vm.provision :shell, :inline => "sudo apt-get update && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean"
# Enable provisioning with Puppet stand alone.
config.vm.provision :puppet do |puppet|
puppet.manifest_file = "vagrant.pp"
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.pp_path = "/etc/puppet"
end
# Define a Host VM
config.vm.define :host do |host_config|
db_config.vm.box = "host"
web_config.vm.network :hostonly, "192.168.50.101"
end
# Define a Puppetmaster VM
config.vm.define :master do |master_config|
master_config.vm.box = "master"
master_config.vm.forward_port 8139, 8140
web_config.vm.network :hostonly, "192.168.50.102"
end
# Define a Proxy VM
config.vm.define :proxy do |proxy_config|
proxy_config.vm.box = "proxy"
proxy_config.vm.forward_port 8139, 8140
web_config.vm.network :hostonly, "192.168.50.103"
end
# Define a Web VM
config.vm.define :web do |web_config|
web_config.vm.box = "web"
web_config.vm.forward_port 80, 8080
web_config.vm.network :hostonly, "192.168.50.104"
end
# Share hiera configuration.
config.vm.share_folder "hiera", "/etc/puppet/hiera", "puppet/hiera", create: true
end
|