-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
51 lines (44 loc) · 1.41 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.provider :libvirt do |vb|
vb.memory = 2048
vb.cpus = "1"
end
config.vm.define "zabbix" do |node|
node.vm.synced_folder ".", "/vagrant", type: "sshfs"
node.vm.hostname = "zabbix.local"
node.vm.network :private_network, ip: "10.0.15.30"
node.vm.provision :hostmanager
node.vm.provision :ansible do |ansible|
ansible.playbook = "playbook.yml"
ansible.compatibility_mode = "2.0"
ansible.limit = "all"
end
end
config.vm.define "proxy" do |node|
node.vm.synced_folder ".", "/vagrant", type: "sshfs"
node.vm.hostname = "proxy.local"
node.vm.network :private_network, ip: "10.0.15.31"
node.vm.provision :hostmanager
end
config.vm.define "client1" do |node|
node.vm.synced_folder ".", "/vagrant", type: "sshfs"
node.vm.hostname = "client1.local"
node.vm.network :private_network, ip: "10.0.15.32"
node.vm.provision :hostmanager
end
config.vm.define "client2" do |node|
node.vm.synced_folder ".", "/vagrant", type: "sshfs"
node.vm.hostname = "client2.local"
node.vm.network :private_network, ip: "10.0.15.33"
node.vm.provision :hostmanager
end
if Vagrant.has_plugin?("vagrant-hostmanager")
config.hostmanager.enabled = false
config.hostmanager.manage_host = true
config.hostmanager.manage_guest = true
config.hostmanager.include_offline = true
end
end