-
Notifications
You must be signed in to change notification settings - Fork 39
/
Vagrantfile
41 lines (38 loc) · 869 Bytes
/
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
boxes = {
"ubuntu/trusty64" => {
:ip => '192.168.33.10',
:cpu => "2",
:ram => "256"
},
"ubuntu/xenial64" => {
:ip => '192.168.33.11',
:cpu => "2",
:ram => "256"
},
"centos/7" => {
:ip => '192.168.33.12',
:cpu => "2",
:ram => "256"
},
"centos/6" => {
:ip => '192.168.33.13',
:cpu => "2",
:ram => "256"
},
}
Vagrant.configure("2") do |config|
boxes.each do |box, options|
config.vm.define box.dup.sub!("/", "-") do |machine|
machine.vm.box = box
machine.vm.box_check_update = false
machine.vm.network :private_network, ip: options[:ip]
machine.vm.provider "virtualbox" do |vb|
vb.memory = options[:ram]
vb.cpus = options[:cpu]
end
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "tests.yml"
end
end
end
end