MT#12713 Support jessie deployments using puppet

puppet in jessie depends on ca-certificates/openssl which
cant' be removed therefore. We actually want to have
ca-certificates/openssl on all our systems anyway and
nowadays debootstrap doesn't install tcpd and xauth any longer,
so we can safely skip those package removals for jessie and newer.

The templatedir doesn't need to be set in recent puppet versions
and older versions use a sane default anyway, therefore dropping it.

puppet as present in jessie (and newer) expects 'puppet agent --enable'
to be executed to actually be enabled.

Change-Id: Iae70eaeec6a56bef0e67171aab74482aebb24181
changes/03/1903/1
Michael Prokop 10 years ago
parent 7340bf211c
commit adcb72d9aa

@ -1293,9 +1293,12 @@ cat >> "${TARGET}/etc/fstab" << EOF
$SWAP_PARTITION none swap sw,pri=0 0 0 $SWAP_PARTITION none swap sw,pri=0 0 0
EOF EOF
# removals: packages which debootstrap installs but d-i doesn't case "$DEBIAN_RELEASE" in
chroot $TARGET apt-get --purge -y remove \ lenny|squeeze|wheezy)
ca-certificates openssl tcpd xauth echo "Removing packages which debootstrap installs but d-i doesn't"
chroot $TARGET apt-get --purge -y remove ca-certificates openssl tcpd xauth
;;
esac
if "$PRO_EDITION" ; then if "$PRO_EDITION" ; then
echo "Pro edition: keeping firmware* packages." echo "Pro edition: keeping firmware* packages."
@ -2077,8 +2080,6 @@ EOF
chroot $TARGET apt-get -y install resolvconf libnss-myhostname chroot $TARGET apt-get -y install resolvconf libnss-myhostname
chroot $TARGET sed -i 's/START=.*/START=yes/' /etc/default/puppet
cat > ${TARGET}/etc/puppet/puppet.conf << EOF cat > ${TARGET}/etc/puppet/puppet.conf << EOF
# Deployed via deployment.sh # Deployed via deployment.sh
[main] [main]
@ -2087,7 +2088,6 @@ vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet rundir=/var/run/puppet
factpath=$vardir/lib/facter factpath=$vardir/lib/facter
templatedir=$confdir/templates
prerun_command=/etc/puppet/etckeeper-commit-pre prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post postrun_command=/etc/puppet/etckeeper-commit-post
server=puppet.mgm.sipwise.com server=puppet.mgm.sipwise.com
@ -2100,7 +2100,16 @@ ssl_client_verify_header=SSL_CLIENT_VERIFY
environment=$PUPPET environment=$PUPPET
EOF EOF
case "$DEBIAN_RELEASE" in
squeeze|wheezy)
chroot $TARGET sed -i 's/START=.*/START=yes/' /etc/default/puppet
grml-chroot $TARGET puppet agent --test --waitforcert 30 2>&1 | tee -a /tmp/puppet.log || true
;;
jessie|stretch)
grml-chroot $TARGET puppet agent --enable 2>&1 | tee -a /tmp/puppet.log || true
grml-chroot $TARGET puppet agent --test --waitforcert 30 2>&1 | tee -a /tmp/puppet.log || true grml-chroot $TARGET puppet agent --test --waitforcert 30 2>&1 | tee -a /tmp/puppet.log || true
;;
esac
fi fi
# make sure we don't leave any running processes # make sure we don't leave any running processes

Loading…
Cancel
Save