forked from bryanwb/chef-jboss
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
54 lines (44 loc) · 1.37 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
distros = {
:lucid32 => {
:url => 'http://files.vagrantup.com/lucid32.box',
:run_list => [ "apt" ]
},
:centos6_32 => {
:url => 'http://vagrant.sensuapp.org/centos-6-i386.box',
},
:debian_squeeze_32 => {
:url => 'http://mathie-vagrant-boxes.s3.amazonaws.com/debian_squeeze_32.box',
:run_list => [ "apt" ]
},
:precise32 => {
:url => 'http://files.vagrantup.com/precise32.box',
:run_list => [ "apt" ]
}
}
Vagrant::Config.run do |config|
distros.each_pair do |name,options|
config.vm.define name do |dist_config|
dist_config.vm.box = name.to_s
dist_config.vm.box_url = options[:url]
dist_config.vm.customize do |vm|
vm.name = name.to_s
vm.memory_size = 1024
end
dist_config.vm.network :bridged, '33.33.33.10'
dist_config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = [ '/tmp/cookbooks' ]
chef.provisioning_path = '/etc/vagrant-chef'
chef.log_level = :debug
chef.run_list = [
"minitest-handler",
"java::openjdk",
"jboss"
]
if options[:run_list]
options[:run_list].each {|recipe| chef.run_list.insert(0, recipe) }
end
chef.json = { }
end
end
end
end