-
Notifications
You must be signed in to change notification settings - Fork 4
/
Vagrantfile
49 lines (38 loc) · 1.39 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
Vagrant.configure(2) do |config|
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 4
end
# Required so that apt cache is populated before ansible runs
config.vm.provision "shell", privileged: true, inline: "apt-get update && apt-get upgrade -y"
config.vm.provision "ansible" do |ansible|
ansible.playbook = "playbook.yml"
ansible.compatibility_mode = "2.0"
ansible.become = true # Run ansible as root
ansible.groups = {
"webproxies" => ["sr-proxy"],
"competitorsvcs" => ["sr-compsvc"],
"kitsvcs" => ["sr-kitsvc"],
}
end
# This name is what's looked up in the Ansible host_vars.
config.vm.define "sr-proxy" do |web|
web.vm.box = "ubuntu/focal64"
web.vm.network "private_network", ip: "192.168.56.56"
web.vm.hostname = "sr-proxy.local"
end
config.vm.define "sr-compsvc" do |compsrv|
compsrv.vm.box = "ubuntu/jammy64"
# This name is what's looked up in the Ansible host_vars.
compsrv.vm.define "sr-compsvc"
compsrv.vm.network "private_network", ip: "192.168.56.57"
compsrv.vm.hostname = "sr-compsvc.local"
end
config.vm.define "sr-kitsvc" do |kitsrv|
kitsrv.vm.box = "ubuntu/jammy64"
# This name is what's looked up in the Ansible host_vars.
kitsrv.vm.define "sr-kitsvc"
kitsrv.vm.network "private_network", ip: "192.168.56.58"
kitsrv.vm.hostname = "sr-kitsvc.local"
end
end