From c844730bdea106d9bda490e71d457dbbf55e129f Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 20 Jun 2010 15:32:20 -0300 Subject: Adding puppetlast cronjob --- manifests/puppetmasterd.pp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/manifests/puppetmasterd.pp b/manifests/puppetmasterd.pp index d7bfd5b..89ffafc 100644 --- a/manifests/puppetmasterd.pp +++ b/manifests/puppetmasterd.pp @@ -80,6 +80,16 @@ class puppetmasterd { require => [ File["/usr/local/sbin/update-puppet-conf.sh"], User["puppet"] ], } + # cron rule to execute puppetlast once a week as a report + cron { "puppetlast": + command => "puppetlast", + user => root, + hour => "0", + minute => "0", + weekday => "0", + ensure => present, + } + # cron rule to restart puppetmaster before restarting the nodes cron { "puppetmaster-restart": command => "/etc/init.d/puppetmaster restart &> /dev/null", @@ -119,4 +129,8 @@ class puppetmasterd::disabled inherits puppetmasterd { Service["puppetmaster"] { ensure => stopped, } + + Cron["puppetlast"] { + ensure => absent, + } } -- cgit v1.2.3