-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
40 lines (35 loc) · 990 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
# -*- mode: ruby -*-
# vim: set ft=ruby :
MACHINES = {
:"bacula" => {
:box_name => "centos/7",
:ip_addr => "172.30.10.50",
:memory => "1024",
:shell => "bacula.sh",
},
:"client" => {
:box_name => "centos/7",
:ip_addr => "172.30.10.51",
:memory => "512",
:shell => "client.sh",
}
}
Vagrant.configure("2") do |config|
MACHINES.each do |boxname, boxconfig|
config.vm.define boxname do |box|
box.vm.box = boxconfig[:box_name]
box.vm.host_name = boxname.to_s
box.vm.network "private_network", ip: boxconfig[:ip_addr]
box.vm.provider "virtualbox" do |vb|
vb.name = boxname.to_s
vb.memory = boxconfig[:memory]
end
box.vm.provision "shell", path: boxconfig[:shell]
#box.vm.provision "ansible_local" do |ansible|
#ansible.playbook = boxconfig[:ansible]
#ansible.inventory_path = "hosts"
#box.vm.provision "shell", path: "shell.sh"
#end
end
end
end