Advertising:
Vagrantfile Ubuntu Server
Jump to navigation
Jump to search
# -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| # Esta linea nos permite loguearnos con usuario (vagrant) Password (vagrant) luego hacemos un sudo -i. config.vm.provision :shell, :inline => "sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config; sudo systemctl restart sshd;", run: "always" # # Descomentar si estamos destras de un proxy # #if Vagrant.has_plugin?("vagrant-proxyconf") # config.proxy.http = "http://192.168.150.17:8080" # config.proxy.https = "http://192.168.150.17:8080" # config.proxy.no_proxy = "localhost,127.0.0.1" #end config.vm.define "zbxsrv01" do |h| h.vm.box = "ubuntu/focal64" h.vm.hostname = "zbxsrv01" h.vm.network "private_network", ip: "10.0.100.100" #h.vm.provision "shell", path: "provisioning.sh" h.vm.provider "virtualbox" do |vb| vb.name = "zbxsrv-ubuntu-20.04LTS" vb.memory = "2048" vb.cpus = 2 end end config.vm.define "zbxclnt01" do |h| h.vm.box = "ubuntu/focal64" h.vm.hostname = "zbxclnt01" h.vm.network "private_network", ip: "10.0.100.101" #h.vm.provision "shell", path: "provisioning.sh" h.vm.provider "virtualbox" do |vb| vb.name = "zbxclnt-ubuntu-20.04LTS" vb.memory = "1024" vb.cpus = 2 end end end