-
Notifications
You must be signed in to change notification settings - Fork 3
/
Vagrantfile
75 lines (69 loc) · 1.84 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
# -*- mode: ruby -*-
def boxify()
box = "centos-6.3"
box_url = "http://ff9ab1b0dd708050f0c2-3d464532f2dc105f18d6ce29cfbb9612.r90.cf2.rackcdn.com/centos-6.3_chef-11.4.4.box"
[box, box_url]
end
def get_recipes()
recipes = %w{
chef-solo-search
minitest-handler
extended_drbd_helper
yum::epel
yum::elrepo
}
# extended_drbd::drbd_fresh_install
# }
recipes
end
Vagrant::Config.run do |config|
config.vm.define :store1a do |subconfig|
subconfig.vm.box, subconfig.vm.box_url = boxify
subconfig.vm.host_name = "store1a.mail.testing.example.com"
subconfig.vm.network :hostonly, "172.31.0.110"
subconfig.vm.provision :chef_solo do |chef|
chef.data_bags_path = 'data_bags'
chef.json = {
:drbd => {
:server => {
:ipaddress => "172.31.0.110"
},
:primary => {
:fqdn => "store1a.mail.testing.example.com"
},
:partner => {
:hostname => "store1b.mail.testing.example.com"
}
}
}
get_recipes.each do |rec|
chef.add_recipe rec
end
end
end
config.vm.define :store1b do |subconfig|
subconfig.vm.box, subconfig.vm.box_url = boxify
subconfig.vm.host_name = "store1b.mail.testing.example.com"
subconfig.vm.network :hostonly, "172.31.0.120"
subconfig.vm.provision :chef_solo do |chef|
chef.data_bags_path = 'data_bags'
chef.json = {
:drbd => {
:server => {
:ipaddress => "172.31.0.120"
},
:primary => {
:fqdn => "store1a.mail.testing.example.com"
},
:partner => {
:hostname => "store1a.mail.testing.example.com"
}
}
}
get_recipes.each do |rec|
chef.add_recipe rec
end
end
end
end
# vim: ai et ts=2 sts=2 sw=2 ft=ruby