This repository has been archived by the owner on Feb 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
83 lines (60 loc) · 2.81 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "db1" do |db1|
db1.vm.box = "hajee/centos-6.5-x86_64"
db1.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777","fmode=777"]
db1.ssh.forward_agent = true
db1.ssh.forward_x11 = true
db1.vm.provider :virtualbox do |vb|
# vb.gui = true
vb.customize ["modifyvm", :id, "--memory", "4096"]
vb.customize ["modifyvm", :id, "--name", "db1"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.customize ["modifyvm", :id, "--nic3", "intnet"]
end
db1.vm.hostname = "db1.example.com"
db1.vm.network :private_network, ip: "172.16.10.20"
db1.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777","fmode=777"]
db1.vm.provision :shell, :inline => "ln -sf /vagrant/puppet/hiera.yaml /etc/puppet/hiera.yaml"
db1.vm.provision :shell, :inline => "rm -rf /etc/puppet/hieradata; ln -sf /vagrant/puppet/hieradata /etc/puppet/hieradata"
db1.vm.provision :puppet do |puppet|
puppet.module_path = "puppet/modules"
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "site.pp"
puppet.options = "--verbose --parser future"
puppet.facter = {
'vm_type' => 'vagrant',
}
end
end
config.vm.define "db2" do |db2|
db2.vm.box = "hajee/centos-6.5-x86_64"
db2.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777","fmode=777"]
db2.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "4096"]
vb.customize ["modifyvm", :id, "--name", "db2"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.customize ["modifyvm", :id, "--nic3", "intnet"]
end
db2.vm.hostname = "db2.example.com"
db2.vm.network :private_network, ip: "172.16.10.30"
db2.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777","fmode=777"]
db2.vm.provision :shell, :inline => "ln -sf /vagrant/puppet/hiera.yaml /etc/puppet/hiera.yaml"
db2.vm.provision :shell, :inline => "rm -rf /etc/puppet/hieradata; ln -sf /vagrant/puppet/hieradata /etc/puppet/hieradata"
db2.vm.provision :shell, :inline => "puppet resource package puppet ensure=3.6.1-1.el6 allow_virtual=false"
db2.vm.provision :puppet do |puppet|
puppet.module_path = "puppet/modules"
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "site.pp"
puppet.options = "--verbose --parser future"
puppet.facter = {
'vm_type' => 'vagrant',
}
end
end
end