From: Peter Palfrader Date: Tue, 17 Jul 2018 15:34:34 +0000 (+0200) Subject: We only have puppets >= 3.0 now X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=commitdiff_plain;h=dbc41cd7676f72feb971b2e2bff579bf57386e8a We only have puppets >= 3.0 now --- diff --git a/modules/debian_org/templates/dsa-puppet-stuff.cron.erb b/modules/debian_org/templates/dsa-puppet-stuff.cron.erb index 813460840..5b739dc8f 100644 --- a/modules/debian_org/templates/dsa-puppet-stuff.cron.erb +++ b/modules/debian_org/templates/dsa-puppet-stuff.cron.erb @@ -1,13 +1,9 @@ @hourly root [ ! -d /var/cache/dsa ] || touch /var/cache/dsa/cron.alive -<% if scope.call_function('versioncmp', [@puppetversion.to_s, '3.0.0']) <= 0 -%> -34 */4 * * * root if [ -x /usr/sbin/puppetd ]; then sleep $(( $RANDOM \% 7200 )); if [ -x /usr/bin/timeout ]; then TO="timeout --kill-after=900 3600"; else TO=""; fi; tmp="$(tempfile)"; egrep -v '^(#|$)' /etc/dsa/cron.ignore.dsa-puppet-stuff > "$tmp" && $TO /usr/sbin/puppetd -o --no-daemonize 2>&1 | egrep --text -v -f "$tmp"; rm -f "$tmp"; fi -<% else -%> # run every 90 minutes 34 */3 * * * root if [ -x /usr/bin/puppet ]; then sleep $(( $RANDOM \% 2200 )); if [ -x /usr/bin/timeout ]; then TO="timeout --kill-after=900 2000"; else TO=""; fi; tmp="$(tempfile)"; egrep -v '^(#|$)' /etc/dsa/cron.ignore.dsa-puppet-stuff > "$tmp" && $TO /usr/bin/puppet agent --onetime --no-daemonize 2>&1 | egrep --text -v -f "$tmp"; rm -f "$tmp"; fi 4 1-23/3 * * * root if [ -x /usr/bin/puppet ]; then sleep $(( $RANDOM \% 2200 )); if [ -x /usr/bin/timeout ]; then TO="timeout --kill-after=900 2000"; else TO=""; fi; tmp="$(tempfile)"; egrep -v '^(#|$)' /etc/dsa/cron.ignore.dsa-puppet-stuff > "$tmp" && $TO /usr/bin/puppet agent --onetime --no-daemonize 2>&1 | egrep --text -v -f "$tmp"; rm -f "$tmp"; fi -<% end -%> @hourly root sleep $(( $RANDOM \% 300 )); if [ -x /usr/lib/nagios/plugins/dsa-check-stunnel-sanity ] && [ -e /etc/stunnel/puppet-ekeyd.conf ] && ! /usr/lib/nagios/plugins/dsa-check-stunnel-sanity > /dev/null && grep -q '^client = yes' /etc/stunnel/puppet-ekeyd.conf; then /usr/sbin/service stunnel4 restart > /dev/null; fi