-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
61 lines (54 loc) · 2.29 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
unless Vagrant.has_plugin?("vagrant-hostsupdater")
raise 'vagrant-hostsupdater is not installed! Run "vagrant plugin install vagrant-hostsupdater"'
end
unless Vagrant.has_plugin?("vagrant-vbguest")
raise 'vagrant-vbguest is not installed! Run "vagrant plugin install vagrant-vbguest"'
end
Vagrant.configure(2) do |config|
config.vm.define "nagios.yourdomain.local" do |nagios|
nagios.vm.box = "serotonin/debian9"
nagios.vm.network "private_network", ip: "192.168.123.200"
nagios.hostsupdater.aliases = ["nagios.yourdomain.local"]
nagios.vm.provider "virtualbox" do | v |
v.memory = 1024
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
nagios.vm.provision "ansible" do |ansible|
#ansible.verbose = "vvvv"
#ansible.tags = ['nagios']
ansible.playbook = "provisioning/playbook.yml"
ansible.inventory_path = "provisioning/inventory-local"
ansible.host_key_checking = false
ansible.become = true
ansible.become_user = "root"
ansible.limit = 'nagios.yourdomain.local'
ansible.extra_vars = {
ansible_ssh_args: '-o ForwardAgent=yes'
}
end
end
config.vm.define "sql.yourdomain.local" do |sql|
sql.vm.box = "serotonin/debian9"
sql.vm.network "private_network", ip: "192.168.123.201"
sql.hostsupdater.aliases = ["sql.yourdomain.local"]
sql.vm.provider "virtualbox" do | v |
v.memory = 1024
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
sql.vm.provision "ansible" do |ansible|
#ansible.verbose = "vvvv"
#ansible.tags = ['nrpe']
ansible.playbook = "provisioning/playbook.yml"
ansible.inventory_path = "provisioning/inventory-local"
ansible.host_key_checking = false
ansible.become = true
ansible.become_user = "root"
ansible.limit = 'sql.yourdomain.local'
ansible.extra_vars = {
ansible_ssh_args: '-o ForwardAgent=yes'
}
end
end
end