add hostnames to /etc/hosts
This commit is contained in:
parent
4e5beafdb0
commit
1619b61256
5
Vagrantfile
vendored
5
Vagrantfile
vendored
@ -13,6 +13,7 @@ Vagrant.configure("2") do |config|
|
|||||||
systemctl enable --now httpd
|
systemctl enable --now httpd
|
||||||
echo "vm1" > /etc/hostname
|
echo "vm1" > /etc/hostname
|
||||||
hostname -F /etc/hostname
|
hostname -F /etc/hostname
|
||||||
|
echo "192.168.56.2 vm1" >> /etc/hosts
|
||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -29,6 +30,7 @@ Vagrant.configure("2") do |config|
|
|||||||
systemctl enable --now httpd
|
systemctl enable --now httpd
|
||||||
echo "vm2" > /etc/hostname
|
echo "vm2" > /etc/hostname
|
||||||
hostname -F /etc/hostname
|
hostname -F /etc/hostname
|
||||||
|
echo "192.168.56.3 vm2" >> /etc/hosts
|
||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -45,6 +47,7 @@ Vagrant.configure("2") do |config|
|
|||||||
apt-get clean
|
apt-get clean
|
||||||
echo "vm3" > /etc/hostname
|
echo "vm3" > /etc/hostname
|
||||||
hostname -F /etc/hostname
|
hostname -F /etc/hostname
|
||||||
|
echo "192.168.56.4 vm3" >> /etc/hosts
|
||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -61,6 +64,7 @@ Vagrant.configure("2") do |config|
|
|||||||
apt-get install mc apache2 -y
|
apt-get install mc apache2 -y
|
||||||
echo "vm4" > /etc/hostname
|
echo "vm4" > /etc/hostname
|
||||||
hostname -F /etc/hostname
|
hostname -F /etc/hostname
|
||||||
|
echo "192.168.56.5 vm4" >> /etc/hosts
|
||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -77,6 +81,7 @@ Vagrant.configure("2") do |config|
|
|||||||
systemctl enable --now httpd
|
systemctl enable --now httpd
|
||||||
echo "zbxsrv" > /etc/hostname
|
echo "zbxsrv" > /etc/hostname
|
||||||
hostname -F /etc/hostname
|
hostname -F /etc/hostname
|
||||||
|
echo "192.168.56.6 zbxsrv" >> /etc/hosts
|
||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user