From a6ce8dcbae87844cc1e695f44bcc184b8d4e995d Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 17 Jul 2018 17:34:08 +0200 Subject: [PATCH] run puppet every 1.5 hrs instead of every 2 --- modules/debian_org/templates/dsa-puppet-stuff.cron.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/debian_org/templates/dsa-puppet-stuff.cron.erb b/modules/debian_org/templates/dsa-puppet-stuff.cron.erb index 71fe19f65..813460840 100644 --- a/modules/debian_org/templates/dsa-puppet-stuff.cron.erb +++ b/modules/debian_org/templates/dsa-puppet-stuff.cron.erb @@ -4,7 +4,9 @@ <% 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 -%> -34 */2 * * * root if [ -x /usr/bin/puppet ]; then sleep $(( $RANDOM \% 3600 )); if [ -x /usr/bin/timeout ]; then TO="timeout --kill-after=900 3000"; 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 +# 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 -- 2.20.1