We're again going to use Vagrant and VirtualBox for our work. We'll configure three virtual machines.
I've put together the following Vagrantfile for use in this chapter:
# -*- mode: ruby -*-
# vi: set ft=ruby :
$provisionScript = <<-SCRIPT
sed -i 's#PasswordAuthentication no#PasswordAuthentication yes#g' /etc/ssh/sshd_config
systemctl restart sshd
SCRIPT
Vagrant.configure("2") do |config|
config.vm.provision "shell",
inline: $provisionScript
config.vm.define "centos1" do |centos1|
centos1.vm.box = "centos/7"
centos1.vm.network "private_network", ip: "192.168.33.10"
centos1.vm.network "private_network", ip: "192.168.44.10", auto_config: false
centos1.vm.hostname = "centos1"
centos1.vm.box_version = "1804.02"
end
config.vm...