98 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			98 lines
		
	
	
		
			2.9 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
Vagrant.configure("2") do |config|
 | 
						|
 | 
						|
  config.vm.define "vm1" do |vm1|
 | 
						|
    vm1.vm.network "private_network", ip: "192.168.56.2"
 | 
						|
    vm1.vm.box = "centos/7"
 | 
						|
    vm1.vm.provider "virtualbox" do |vb|
 | 
						|
      vb.memory = "512"
 | 
						|
      vb.cpus = 1
 | 
						|
    end
 | 
						|
    vm1.vm.synced_folder ".", "/vagrant", disabled: true
 | 
						|
    vm1.vm.provision "shell", inline: <<-SHELL
 | 
						|
      yum install mc epel-release httpd net-tools -y
 | 
						|
      yum update -y
 | 
						|
      systemctl enable --now httpd
 | 
						|
      echo "vm1" > /etc/hostname
 | 
						|
      hostname -F /etc/hostname
 | 
						|
      echo "192.168.56.2 vm1" >> /etc/hosts
 | 
						|
      timedatectl set-timezone Europe/Budapest
 | 
						|
    SHELL
 | 
						|
  end
 | 
						|
 | 
						|
  config.vm.define "vm2" do |vm2|
 | 
						|
    vm2.vm.network "private_network", ip: "192.168.56.3"
 | 
						|
    vm2.vm.box = "almalinux/8"
 | 
						|
    vm2.vm.provider "virtualbox" do |vb|
 | 
						|
      vb.memory = "768"
 | 
						|
      vb.cpus = 1
 | 
						|
    end
 | 
						|
    vm2.vm.synced_folder ".", "/vagrant", disabled: true
 | 
						|
    vm2.vm.provision "shell", inline: <<-SHELL
 | 
						|
      dnf install mc epel-release httpd net-tools -y
 | 
						|
      dnf update -y
 | 
						|
      systemctl enable --now httpd
 | 
						|
      echo "vm2" > /etc/hostname
 | 
						|
      hostname -F /etc/hostname
 | 
						|
      echo "192.168.56.3 vm2" >> /etc/hosts
 | 
						|
      timedatectl set-timezone Europe/Budapest
 | 
						|
    SHELL
 | 
						|
  end
 | 
						|
 | 
						|
  config.vm.define "vm3" do |vm3|
 | 
						|
    vm3.vm.network "private_network", ip: "192.168.56.4"
 | 
						|
    vm3.vm.box = "ubuntu/jammy64"
 | 
						|
    vm3.vm.provider "virtualbox" do |vb|
 | 
						|
      vb.memory = "512"
 | 
						|
      vb.cpus = 1
 | 
						|
    end
 | 
						|
    vm3.vm.synced_folder ".", "/vagrant", disabled: true
 | 
						|
    vm3.vm.provision "shell", inline: <<-SHELL
 | 
						|
      apt-get update && apt-get upgrade -y
 | 
						|
      apt-get install mc apache2 -y
 | 
						|
      apt-get clean
 | 
						|
      echo "vm3" > /etc/hostname
 | 
						|
      hostname -F /etc/hostname
 | 
						|
      echo "192.168.56.4 vm3" >> /etc/hosts
 | 
						|
      timedatectl set-timezone Europe/Budapest
 | 
						|
    SHELL
 | 
						|
  end
 | 
						|
 | 
						|
  config.vm.define "vm4" do |vm4|
 | 
						|
    vm4.vm.network "private_network", ip: "192.168.56.5"
 | 
						|
    vm4.vm.box = "debian/bullseye64"
 | 
						|
    vm4.vm.provider "virtualbox" do |vb|
 | 
						|
      vb.memory = "512"
 | 
						|
      vb.cpus = 1
 | 
						|
    end
 | 
						|
    vm4.vm.synced_folder ".", "/vagrant", disabled: true
 | 
						|
    vm4.vm.provision "shell", inline: <<-SHELL
 | 
						|
      apt-get update && apt-get upgrade -y
 | 
						|
      apt-get clean
 | 
						|
      apt-get install mc apache2 -y
 | 
						|
      echo "vm4" > /etc/hostname
 | 
						|
      hostname -F /etc/hostname
 | 
						|
      echo "192.168.56.5 vm4" >> /etc/hosts
 | 
						|
      timedatectl set-timezone Europe/Budapest
 | 
						|
    SHELL
 | 
						|
  end
 | 
						|
 | 
						|
  config.vm.define "zbxsrv" do |zbxsrv|
 | 
						|
    zbxsrv.vm.network "private_network", ip: "192.168.56.6"
 | 
						|
    zbxsrv.vm.box = "centos/7"
 | 
						|
    zbxsrv.vm.provider "virtualbox" do |vb|
 | 
						|
      vb.memory = "512"
 | 
						|
      vb.cpus = 1
 | 
						|
    end
 | 
						|
    zbxsrv.vm.synced_folder ".", "/vagrant", disabled: true
 | 
						|
    zbxsrv.vm.provision "shell", inline: <<-SHELL
 | 
						|
      yum install mc epel-release net-tools -y
 | 
						|
      yum update -y
 | 
						|
      echo "zbxsrv" > /etc/hostname
 | 
						|
      hostname -F /etc/hostname
 | 
						|
      echo "192.168.56.6 zbxsrv" >> /etc/hosts
 | 
						|
      timedatectl set-timezone Europe/Budapest
 | 
						|
    SHELL
 | 
						|
  end
 | 
						|
 | 
						|
end
 |