From: Peter Palfrader Date: Sun, 30 Nov 2014 09:43:51 +0000 (+0100) Subject: Need to use /usr/bin/puppet now that /usr/sbin/puppetd is gone X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=125230bcff9ef4c97e3cc8cb7909d2e634da735b;p=mirror%2Fdsa-puppet.git Need to use /usr/bin/puppet now that /usr/sbin/puppetd is gone --- diff --git a/modules/debian-org/files/dsa-puppet-stuff.cron b/modules/debian-org/files/dsa-puppet-stuff.cron deleted file mode 100644 index 1aab5c7de..000000000 --- a/modules/debian-org/files/dsa-puppet-stuff.cron +++ /dev/null @@ -1,8 +0,0 @@ -## -## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. -## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git -## - -SHELL=/bin/bash -@hourly root [ ! -d /var/cache/dsa ] || touch /var/cache/dsa/cron.alive -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 diff --git a/modules/debian-org/manifests/init.pp b/modules/debian-org/manifests/init.pp index 03e8a071b..f599a7be2 100644 --- a/modules/debian-org/manifests/init.pp +++ b/modules/debian-org/manifests/init.pp @@ -251,7 +251,7 @@ class debian-org { } file { '/etc/cron.d/dsa-puppet-stuff': - source => 'puppet:///modules/debian-org/dsa-puppet-stuff.cron', + content => template('debian-org/dsa-puppet-stuff.cron.erb') require => Package['debian.org'], } file { '/etc/ldap/ldap.conf': diff --git a/modules/debian-org/templates/dsa-puppet-stuff.cron.erb b/modules/debian-org/templates/dsa-puppet-stuff.cron.erb new file mode 100644 index 000000000..e6ddd74fa --- /dev/null +++ b/modules/debian-org/templates/dsa-puppet-stuff.cron.erb @@ -0,0 +1,12 @@ +## +## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. +## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git +## + +SHELL=/bin/bash +@hourly root [ ! -d /var/cache/dsa ] || touch /var/cache/dsa/cron.alive +<% if @lsbmajdistrelease <= '7' -%> +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 */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 -%>