From 3aac1f97d8e1d199b0e2aedc1413ce230a316ad0 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Mon, 10 Jul 2023 16:32:20 +0200 Subject: [PATCH] Add additional packages for use with debian 12 This patch will install three packages that is needed for normal operations of puppet using puppet-sunet with multiverse on Debian 12: cron puppet-module-puppetlabs-cron-core puppet-module-camptocamp-augeas --- global/pre-tasks.d/030puppet | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/global/pre-tasks.d/030puppet b/global/pre-tasks.d/030puppet index 1a7f69a..4cfa3a2 100755 --- a/global/pre-tasks.d/030puppet +++ b/global/pre-tasks.d/030puppet @@ -7,10 +7,17 @@ set -e stamp="$COSMOS_BASE/stamps/puppet-tools-v01.stamp" -if ! test -f $stamp -a -f /usr/bin/puppet; then +if ! test -f "${stamp}" -a -f /usr/bin/puppet; then apt-get update apt-get -y install puppet + . /etc/os-release - mkdir -p `dirname $stamp` - touch $stamp + # Note: in posix shell, string comparison is done with a single = + if [ "${ID}" = "debian" ] && [ "${VERSION_ID}" -ge 12 ]; then + apt-get -y install cron puppet-module-puppetlabs-cron-core puppet-module-camptocamp-augeas + fi + + mkdir -p "$(dirname "${stamp}")" + touch "${stamp}" fi +