]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Need to use /usr/bin/puppet now that /usr/sbin/puppetd is gone
authorPeter Palfrader <peter@palfrader.org>
Sun, 30 Nov 2014 09:43:51 +0000 (10:43 +0100)
committerPeter Palfrader <peter@palfrader.org>
Sun, 30 Nov 2014 09:44:05 +0000 (10:44 +0100)
modules/debian-org/files/dsa-puppet-stuff.cron [deleted file]
modules/debian-org/manifests/init.pp
modules/debian-org/templates/dsa-puppet-stuff.cron.erb [new file with mode: 0644]

diff --git a/modules/debian-org/files/dsa-puppet-stuff.cron b/modules/debian-org/files/dsa-puppet-stuff.cron
deleted file mode 100644 (file)
index 1aab5c7..0000000
+++ /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
index 03e8a071b42abd0123024e9c9aa0255f9a79c152..f599a7be2b7950c667ee2b70f88ac14c96528a8a 100644 (file)
@@ -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 (file)
index 0000000..e6ddd74
--- /dev/null
@@ -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 -%>