Skip to content

Commit 0473dea

Browse files
authored
Merge pull request #378 from ComputeCanada/el10
Fixes to be able to complete the puppet installation and configuration with EL10 images
2 parents 193c337 + 105d963 commit 0473dea

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

common/configuration/puppet.yaml.tftpl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ runcmd:
3535
# most container images do not have selinux pre-installed
3636
- restorecon -R /${sudoer_username}
3737
%{ endif }
38+
# If the image has not openssh-server installed but sshd_config still exists
39+
# installing the new RPM will not overwrite the file and depending on the file
40+
# content it might catastrophic (some sshd_config are empty, some miss esential lines).
41+
# Therefore when openssh-server is not installed, we remove sshd_config before installing it.
42+
- "[ -z $(rpm -qa openssh-server) ] && rm -f /etc/ssh/sshd_config"
3843
- dnf -y install openssh openssh-server rsync
3944
- echo -e "Include /etc/ssh/sshd_config.d/50-authenticationmethods.conf" >> /etc/ssh/sshd_config
4045
- sed -i '/HostKey \/etc\/ssh\/ssh_host_ecdsa_key/ s/^#*/#/' /etc/ssh/sshd_config
@@ -64,8 +69,8 @@ runcmd:
6469
dnf -y upgrade -x openvox*
6570
%{ endif ~}
6671
# Puppet agent configuration and install
67-
dnf -y install https://yum.voxpupuli.org/openvox8-release-el-$(grep -oP 'VERSION_ID="\K[^"]' /etc/os-release).noarch.rpm
68-
dnf -y install openvox-agent-8.19.2
72+
dnf -y install https://yum.voxpupuli.org/openvox8-release-el-$(grep -oP 'VERSION_ID="\K\d*' /etc/os-release).noarch.rpm
73+
dnf -y install openvox-agent-8.23.1
6974
install -m 700 /dev/null /opt/puppetlabs/bin/postrun
7075
# kernel configuration
7176
systemctl disable kdump
@@ -74,7 +79,7 @@ runcmd:
7479
fi
7580
%{ if contains(tags, "puppet") }
7681
# Install puppetserver
77-
- dnf -y install openvox-server-8.8.1
82+
- dnf -y install openvox-server-8.11.0
7883
# Configure puppet-agent to start after puppetserver when on puppetserver
7984
- sed -i 's/^\(After=.*\)$/\1 puppetserver.service/' /usr/lib/systemd/system/puppet.service
8085
- systemctl daemon-reload

0 commit comments

Comments
 (0)