Make dsa-puppet-stuff a concat
authorPeter Palfrader <peter@palfrader.org>
Mon, 25 Dec 2017 10:44:47 +0000 (11:44 +0100)
committerPeter Palfrader <peter@palfrader.org>
Mon, 25 Dec 2017 10:44:47 +0000 (11:44 +0100)
modules/debian_org/manifests/init.pp
modules/debian_org/templates/dsa-puppet-stuff.cron.erb

index 616be75..9e1c384 100644 (file)
@@ -178,7 +178,19 @@ class debian_org {
                notify => Exec['systemctl daemon-reload'],
        }
 
-       file { '/etc/cron.d/dsa-puppet-stuff':
+       concat { '/etc/cron.d/dsa-puppet-stuff': }
+       concat::fragment { 'dsa-puppet-stuff---header':
+               target => '/etc/cron.d/dsa-puppet-stuff',
+               order  => '000',
+               content  => @(EOF)
+                       ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+                       SHELL=/bin/bash
+                       PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/nagios/plugins
+                       | EOF
+       }
+       concat::fragment { 'dsa-puppet-stuff---all':
+               target => '/etc/cron.d/dsa-puppet-stuff',
+               order  => '010',
                content => template('debian_org/dsa-puppet-stuff.cron.erb'),
                require => Package['debian.org'],
        }
index 0f772b5..73679cf 100644 (file)
@@ -1,10 +1,4 @@
-##
-## 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 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 -%>