Patrik Holmqvist
bc9d1dc960
This is how we do it in modern debian so it makes sense to do it on modern ubuntu as well.
32 lines
822 B
Bash
Executable file
32 lines
822 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Re-used example from SJD
|
|
#
|
|
|
|
set -e
|
|
|
|
stamp="$COSMOS_BASE/stamps/puppet-tools-v01.stamp"
|
|
|
|
if ! test -f "${stamp}" -a -f /usr/bin/puppet; then
|
|
apt-get update
|
|
apt-get -y install puppet
|
|
. /etc/os-release
|
|
|
|
# Note: in posix shell, string comparison is done with a single =
|
|
if [ "${ID}" = "debian" ] && [ "${VERSION_ID}" -ge 12 ] || ([ "${ID}" = "ubuntu" ] && $(dpkg --compare-versions ${VERSION_ID} ge 24.04)) ; then
|
|
apt-get -y install \
|
|
cron \
|
|
puppet-module-camptocamp-augeas \
|
|
puppet-module-puppetlabs-apt \
|
|
puppet-module-puppetlabs-concat \
|
|
puppet-module-puppetlabs-cron-core \
|
|
puppet-module-puppetlabs-stdlib \
|
|
puppet-module-puppetlabs-vcsrepo
|
|
|
|
fi
|
|
|
|
mkdir -p "$(dirname "${stamp}")"
|
|
touch "${stamp}"
|
|
fi
|
|
|