1
1
This commit is contained in:
Márkus Sándor 2023-06-27 19:27:11 +02:00
parent 165835571f
commit dc2faa20ff

65
Vagrantfile vendored
View File

@ -1,14 +1,67 @@
Vagrant.configure("2") do |config| Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
#config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1" config.vm.define "vm1" do |vm1|
config.vm.network "private_network", ip: "192.168.56.2" vm1.vm.network "private_network", ip: "192.168.56.2"
config.vm.provider "virtualbox" do |vb| vm1.vm.box = "centos/7"
vm1.vm.provider "virtualbox" do |vb|
vb.memory = "1024" vb.memory = "1024"
vb.cpus = 2 vb.cpus = 2
end end
config.vm.provision "shell", inline: <<-SHELL vm1.vm.provision "shell", inline: <<-SHELL
yum install mc epel-release httpd net-tools -y yum install mc epel-release httpd net-tools -y
yum update -y --skip-broken yum update -y
systemctl enable --now httpd systemctl enable --now httpd
echo "vm1" > /etc/hostname
hostname -F /etc/hostname
SHELL 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 = "1024"
vb.cpus = 2
end
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
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 = "1024"
vb.cpus = 2
end
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
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 = "1024"
vb.cpus = 2
end
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
SHELL
end
end end