-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathVagrantfile
More file actions
49 lines (38 loc) · 1.53 KB
/
Vagrantfile
File metadata and controls
49 lines (38 loc) · 1.53 KB
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-competitorsvc"],
"competitionsvcs" => ["sr-competitionsvcs"],
}
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-competitorsvcs" do |competitorsrv|
competitorsrv.vm.box = "ubuntu/jammy64"
# This name is what's looked up in the Ansible host_vars.
competitorsrv.vm.define "sr-competitorsvcs"
competitorsrv.vm.network "private_network", ip: "192.168.56.57"
competitorsrv.vm.hostname = "sr-competitorsvcs.local"
end
config.vm.define "sr-competitionsvcs" do |competitionsrv|
competitionsrv.vm.box = "ubuntu/jammy64"
# This name is what's looked up in the Ansible host_vars.
competitionsrv.vm.define "sr-competitionsvcs"
competitionsrv.vm.network "private_network", ip: "192.168.56.58"
competitionsrv.vm.hostname = "sr-competitionsvcs.local"
end
end