learn-ansible/Vagrantfile

62 lines
1.7 KiB
Ruby

Vagrant.configure("2") do |config|
config.vm.box = "generic/rocky9"
config.ssh.insert_key = false
config.vm.synced_folder "." "/vagrant", disabled: true
config.vm.provider :virtualbox do |v|
v.memory = 512
v.linked_clone = true
end
config.vm.define "app1" do |app|
app.vm.hostname = "orc-app1.test"
app.vm.network :private_network, ip: "192.168.60.4"
app.vm.network :forwarded_port, guest: 22, host: 2222, id: 'ssh'
end
config.vm.define "app2" do |app|
app.vm.hostname = "orc-app2.test"
app.vm.network :private_network, ip: "192.168.60.5"
app.vm.network :forwarded_port, guest: 22, host: 2200, id: 'ssh'
end
config.vm.define "db" do |db|
db.vm.hostname = "orc-db.test"
db.vm.network :private_network, ip: "192.168.60.6"
db.vm.network :forwarded_port, guest: 22, host: 2201, id: 'ssh'
end
end
Vagrant.configure("2") do |config|
config.vm.box = "generic/debian12"
config.ssh.insert_key = false
config.vm.synced_folder "." "/vagrant", disabled: true
config.vm.provider :virtualbox do |v|
v.memory = 512
v.linked_clone = true
end
config.vm.define "deb" do |app|
app.vm.hostname = "deb.test"
app.vm.network :private_network, ip: "192.168.60.7"
app.vm.network :forwarded_port, guest: 22, host: 2202, id: 'ssh'
end
end
Vagrant.configure("2") do |config|
config.vm.box = "gusztavvargadr/ubuntu-server"
config.ssh.insert_key = false
config.vm.synced_folder "." "/vagrant", disabled: true
config.vm.provider :virtualbox do |v|
v.memory = 512
v.linked_clone = true
end
config.vm.define "ubu" do |app|
app.vm.hostname = "ubu.test"
app.vm.network :private_network, ip: "192.168.60.8"
app.vm.network :forwarded_port, guest: 22, host: 2203, id: 'ssh'
end
end