forked from geerlingguy/ansible-for-devops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
47 lines (38 loc) · 1.21 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "geerlingguy/ubuntu2004"
config.vm.synced_folder '.', '/vagrant', disabled: true
config.ssh.insert_key = false
config.vm.provider :virtualbox do |v|
v.memory = 4096
v.cpus = 2
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--ioapic", "on"]
end
# ELK server.
config.vm.define "logs" do |logs|
logs.vm.hostname = "logs.test"
logs.vm.network :private_network, ip: "192.168.56.90"
logs.vm.provision :ansible do |ansible|
ansible.playbook = "provisioning/elk/main.yml"
ansible.inventory_path = "provisioning/elk/inventory"
ansible.become = true
end
end
# Web server.
config.vm.define "web" do |web|
web.vm.hostname = "web.test"
web.vm.network :private_network, ip: "192.168.56.91"
web.vm.provider :virtualbox do |v|
v.memory = 512
v.cpus = 1
end
web.vm.provision :ansible do |ansible|
ansible.playbook = "provisioning/web/main.yml"
ansible.inventory_path = "provisioning/web/inventory"
ansible.become = true
end
end
end