Added postgres section to Vagrantfile.template

This commit is contained in:
strNophix 2022-03-14 11:32:58 +01:00
parent b71d98dcea
commit 6e55c7ef47

View File

@ -12,6 +12,7 @@ Vagrant.configure("2") do |config|
num_webserver = #{numWebserver}
num_loadbalancer = #{numLoadbalancers}
num_postgresql = #{numPostgresql}
(1..num_webserver).each do |nth|
machine_id = "#{customerName}-bloated-debian-web%d" % [nth]
@ -36,6 +37,25 @@ Vagrant.configure("2") do |config|
machine_id = "#{customerName}-bloated-debian-lb%d" % [nth]
machine_ip = increment_ip()
config.vm.define machine_id do |web|
web.vm.box = "ubuntu/focal64"
web.vm.hostname = machine_id
web.vm.network "private_network", ip: machine_ip
web.vm.provision "file", source: "./.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys"
web.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
vb.gui = false
vb.name = machine_id
end
end
end
(1..num_postgresql).each do |nth|
machine_id = "#{customerName}-bloated-debian-db%d" % [nth]
machine_ip = increment_ip()
config.vm.define machine_id do |web|
web.vm.box = "ubuntu/focal64"
web.vm.hostname = machine_id