2015-10-19 22:13:41 -05:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
|
|
|
Vagrant.configure(2) do |config|
|
|
|
|
|
2021-04-19 17:40:40 -05:00
|
|
|
# Replace this with "fedora/34-cloud-base" (or latest) for a fresh box without
|
|
|
|
# pre-installed freeipa packages, you must also uncomment shell provisioning step
|
|
|
|
# at the bottom of this file.
|
|
|
|
# config.vm.box = "fedora/34-cloud-base"
|
|
|
|
config.vm.box = "freeipa/freeipa-workshop"
|
2015-10-19 22:13:41 -05:00
|
|
|
|
|
|
|
config.vm.synced_folder ".", "/vagrant", disabled: true
|
|
|
|
|
2016-01-27 06:25:22 -06:00
|
|
|
config.vm.provider :libvirt do |libvirt|
|
2019-08-08 04:37:53 -05:00
|
|
|
libvirt.qemu_use_session = false
|
2016-01-27 06:25:22 -06:00
|
|
|
libvirt.memory = 1024
|
|
|
|
end
|
|
|
|
|
2021-04-19 17:40:40 -05:00
|
|
|
config.vm.provider :virtualbox do |virtualbox|
|
|
|
|
virtualbox.memory = 1536
|
|
|
|
end
|
2015-10-19 22:13:41 -05:00
|
|
|
|
|
|
|
config.vm.define "server" do |server|
|
|
|
|
server.vm.network "private_network", ip: "192.168.33.10"
|
|
|
|
server.vm.hostname = "server.ipademo.local"
|
2021-04-19 17:40:40 -05:00
|
|
|
|
|
|
|
config.vm.provider "virtualbox" do |v|
|
|
|
|
v.memory = 1536
|
|
|
|
end
|
|
|
|
config.vm.provider "libvirt" do |v|
|
|
|
|
v.memory = 1536
|
|
|
|
end
|
|
|
|
|
2015-10-19 22:13:41 -05:00
|
|
|
end
|
|
|
|
|
2016-01-24 19:20:16 -06:00
|
|
|
config.vm.define "replica" do |replica|
|
|
|
|
replica.vm.network "private_network", ip: "192.168.33.11"
|
|
|
|
replica.vm.hostname = "replica.ipademo.local"
|
|
|
|
|
2018-06-10 19:40:03 -05:00
|
|
|
replica.vm.provision "shell",
|
|
|
|
inline: 'echo "PEERDNS=no" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
|
|
|
|
replica.vm.provision "shell",
|
|
|
|
inline: 'echo "DNS1=192.168.33.10" >> /etc/sysconfig/network-scripts/ifcfg-eth1'
|
2016-01-27 06:25:22 -06:00
|
|
|
replica.vm.provision "shell",
|
2021-04-19 17:40:40 -05:00
|
|
|
inline: 'printf "DNS=192.168.33.10\nDomains=~." >> /etc/systemd/resolved.conf'
|
|
|
|
replica.vm.provision "shell",
|
|
|
|
inline: 'systemctl restart systemd-resolved'
|
|
|
|
|
|
|
|
config.vm.provider "virtualbox" do |v|
|
|
|
|
v.memory = 1536
|
|
|
|
end
|
|
|
|
config.vm.provider "libvirt" do |v|
|
|
|
|
v.memory = 1536
|
|
|
|
end
|
|
|
|
|
2016-01-24 19:20:16 -06:00
|
|
|
end
|
|
|
|
|
2015-10-19 22:13:41 -05:00
|
|
|
config.vm.define "client" do |client|
|
|
|
|
client.vm.network "private_network", ip: "192.168.33.20"
|
|
|
|
client.vm.hostname = "client.ipademo.local"
|
|
|
|
|
2018-06-10 19:40:03 -05:00
|
|
|
client.vm.provision "shell",
|
|
|
|
inline: 'echo "PEERDNS=no" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
|
|
|
|
client.vm.provision "shell",
|
|
|
|
inline: 'echo "DNS1=192.168.33.10" >> /etc/sysconfig/network-scripts/ifcfg-eth1'
|
2016-01-27 06:25:22 -06:00
|
|
|
client.vm.provision "shell",
|
2021-04-19 17:40:40 -05:00
|
|
|
inline: 'printf "DNS=192.168.33.10\nDomains=~." >> /etc/systemd/resolved.conf'
|
|
|
|
client.vm.provision "shell",
|
|
|
|
inline: 'systemctl restart systemd-resolved'
|
2016-01-27 06:25:22 -06:00
|
|
|
client.vm.provision "shell",
|
2018-06-04 19:55:02 -05:00
|
|
|
inline: 'sudo sed -i "s/^/#/g" /etc/httpd/conf.d/ssl.conf'
|
2016-01-27 06:25:22 -06:00
|
|
|
client.vm.provision "shell",
|
2015-10-21 21:55:46 -05:00
|
|
|
inline: 'systemctl -q enable httpd && systemctl start httpd'
|
2018-06-04 19:55:02 -05:00
|
|
|
client.vm.provision "shell",
|
|
|
|
inline: 'systemctl -q enable oddjobd && systemctl start oddjobd'
|
2015-10-19 22:13:41 -05:00
|
|
|
end
|
|
|
|
|
2021-04-19 17:40:40 -05:00
|
|
|
# Uncomment line below when using Fedora's cloud base box.
|
|
|
|
# config.vm.provision "shell", path: "workshop-install-packages.sh"
|
|
|
|
config.vm.provision "shell", path: "workshop-ipa-customizations.sh"
|
|
|
|
|
2015-10-19 22:13:41 -05:00
|
|
|
end
|