Skip to content

Commit

Permalink
Add support for Debian 12 Bookworm
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrizzell committed Nov 26, 2023
1 parent 963f521 commit b09d06b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 10 deletions.
24 changes: 22 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Vagrant.configure("2") do |config|
box.vm.hostname = 'ipa-client-6.vagrant.example.lan'
box.vbguest.installer_options = { allow_kernel_upgrade: true }
box.vm.provider 'virtualbox' do |vb|
vb.customize ["modifyvm", :id, "--natnet1", "172.31.10/24"]
vb.customize ["modifyvm", :id, "--natnet1", "172.31.9/24"]
vb.gui = false
vb.memory = 1024
vb.customize ["modifyvm", :id, "--ioapic", "on"]
Expand All @@ -183,7 +183,7 @@ Vagrant.configure("2") do |config|
box.vm.hostname = 'ipa-client-7.vagrant.example.lan'
box.vbguest.installer_options = { allow_kernel_upgrade: true }
box.vm.provider 'virtualbox' do |vb|
vb.customize ["modifyvm", :id, "--natnet1", "172.31.10/24"]
vb.customize ["modifyvm", :id, "--natnet1", "172.31.9/24"]
vb.gui = false
vb.memory = 1024
vb.customize ["modifyvm", :id, "--ioapic", "on"]
Expand Down Expand Up @@ -214,4 +214,24 @@ Vagrant.configure("2") do |config|
box.vm.provision "shell", path: "vagrant/debian.sh"
box.vm.provision "shell", path: "vagrant/ipa-client.sh"
end

config.vm.define "ipa-client-9" do |box|
box.vm.box = "generic/debian12"
box.vm.box_version = "4.0.0"
box.vm.synced_folder '.', '/vagrant', type: "rsync", rsync__auto: true, rsync__exclude: vagrant_ignore
box.vm.hostname = 'ipa-client-9.vagrant.example.lan'
box.vbguest.installer_options = { allow_kernel_upgrade: true }
box.vm.provider 'virtualbox' do |vb|
vb.customize ["modifyvm", :id, "--natnet1", "172.31.9/24"]
vb.gui = false
vb.memory = 1024
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.customize ["modifyvm", :id, "--hpet", "on"]
end
box.vm.network "private_network", ip: "192.168.56.45"
box.vm.provision "shell", path: "vagrant/install-puppet.sh"
box.vm.provision "shell", path: "vagrant/common.sh"
box.vm.provision "shell", path: "vagrant/debian.sh"
box.vm.provision "shell", path: "vagrant/ipa-client.sh"
end
end
4 changes: 2 additions & 2 deletions manifests/install/client/debian.pp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#
# @summary Ensure that home directories get created on Debian and Ubuntu clients.
#
#
# This code is needed as the --mkhomedir parameter passed to ipa-client-install does
# not configure PAM even though it does install the required packages.
#
# Currently Ubuntu 14.04/16.04 and Debian 8/9 are supported.
#
class easy_ipa::install::client::debian {
case $facts['os']['distro']['codename'] {
/^(xenial|stretch|bionic|focal|buster|bullseye|jammy)$/: {
/^(xenial|stretch|bionic|focal|buster|bullseye|jammy|bookworm)$/: {
# Ensure that required packages are present even if they do not get pulled
# in as freeipa-client package dependencies
stdlib::ensure_packages(['oddjob','oddjob-mkhomedir'], { 'ensure' => 'present' })
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
'Debian': {
case $facts['os']['distro']['codename'] {
/(trusty|xenial|bionic|buster|focal|bullseye|jammy)/: { $ipa_client_package_ensure = 'present' }
/(trusty|xenial|bionic|buster|focal|bullseye|jammy|bookworm)/: { $ipa_client_package_ensure = 'present' }
/(stretch)/: { $ipa_client_package_ensure = 'absent' }
default: { fail('ERROR: unsupported operating system') }
}
Expand Down
4 changes: 0 additions & 4 deletions vagrant/install-puppet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ detect_osfamily() {
DESCR="$(lsb_release -d | awk '{ print $2}')"
if [ `echo $DESCR|grep Ubuntu` ]; then
UBUNTU_VERSION="$(lsb_release -c | awk '{ print $2}')"
# TODO: Remove when Puppet makes a jammy release
if [ "$UBUNTU_VERSION" = "jammy" ]; then
UBUNTU_VERSION="focal"
fi
elif [ `echo $DESCR|grep Debian` ]; then
DEBIAN_VERSION="$(lsb_release -c | awk '{ print $2}')"
else
Expand Down
2 changes: 1 addition & 1 deletion vagrant/ipa-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puppet apply --modulepath '/tmp/modules:/etc/puppetlabs/code/environments/produc
nameservers => ['192.168.56.35'],\
}\
}\
/(bionic|buster|focal|bullseye|jammy)/: {\
/(bionic|buster|focal|bullseye|jammy|bookworm)/: {\
class { 'systemd':\
manage_resolved => true,\
dns => ['192.168.56.35'],\
Expand Down

0 comments on commit b09d06b

Please sign in to comment.