X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fdebian-org%2Ftemplates%2Fdsa-puppet-stuff.cron.erb;h=48fab729de6cfb25c36cb36d4d6acead835f8ea3;hb=d55193d32bcface5935ae2a6acc2cdc6eed71a80;hp=6bd13a131ddce1890a795dee586b658da958ca34;hpb=545beb1a8c528b96c44a803b60ac86c25c5674d9;p=mirror%2Fdsa-puppet.git diff --git a/modules/debian-org/templates/dsa-puppet-stuff.cron.erb b/modules/debian-org/templates/dsa-puppet-stuff.cron.erb index 6bd13a131..48fab729d 100644 --- a/modules/debian-org/templates/dsa-puppet-stuff.cron.erb +++ b/modules/debian-org/templates/dsa-puppet-stuff.cron.erb @@ -6,13 +6,15 @@ SHELL=/bin/bash @hourly root [ ! -d /var/cache/dsa ] || touch /var/cache/dsa/cron.alive <% if @lsbmajdistrelease <= '7' -%> -<% if scope.lookupvar('::hostname') == 'ball' -%> -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/bin/ruby1.9.1 /usr/sbin/puppetd -o --no-daemonize 2>&1 | egrep --text -v -f "$tmp"; rm -f "$tmp"; fi -<% else -%> 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 -<% end -%> <% else -%> 34 */4 * * * root if [ -x /usr/bin/puppet ]; 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/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 + +@daily munin-async [ -d /var/lib/munin-async ] && find /var/lib/munin-async -maxdepth 1 -type f -mtime +30 -delete + +@daily root [ -d /var/lib/puppet/clientbucket ] && find /var/lib/puppet/clientbucket -type f -mtime +60 -delete && find /var/lib/puppet/clientbucket -type d -empty -delete + +@hourly root ! [ -x /usr/local/sbin/ntp-restart-if-required ] || /usr/local/sbin/ntp-restart-if-required