-
Notifications
You must be signed in to change notification settings - Fork 14
/
Vagrantfile.rhel
31 lines (31 loc) · 1.08 KB
/
Vagrantfile.rhel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- mode: ruby -*-
# vi: set ft=ruby :
# ensure SSH password login
$script = <<-SCRIPT
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
systemctl restart sshd
useradd ansible
SCRIPT
Vagrant.configure("2") do |config|
config.vm.define "control" do |control|
control.vm.box = "rockylinux/8"
control.vm.hostname = "control"
control.vm.network :private_network, :ip => "192.168.123.30", :libvirt__adapter => 1
control.vm.provision "shell",
inline: $script
end
config.vm.define "node1" do |node1|
node1.vm.box = "rockylinux/8"
node1.vm.hostname = "node1"
node1.vm.network :private_network, :ip => "192.168.123.31", :libvirt__iface_name => 1
node1.vm.provision "shell",
inline: $script
end
config.vm.define "node2" do |node2|
node2.vm.box = "rockylinux/8"
node2.vm.hostname = "node2"
node2.vm.network :private_network, :ip => "192.168.123.32", :libvirt__iface_name => 1
node2.vm.provision "shell",
inline: $script
end
end