]> gitweb.fluxo.info Git - puppet-puppet.git/commitdiff
Puppetlast still working for 0.25.4
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 23 Feb 2011 21:32:22 +0000 (18:32 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 23 Feb 2011 21:32:22 +0000 (18:32 -0300)
manifests/puppetmasterd.pp

index c3504fa238846a29340885697ac5e5ec0c08589a..a961cadf966e93c14713fd728d5ff62aa37ecbe2 100644 (file)
@@ -89,17 +89,6 @@ 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  => "/usr/local/sbin/puppetlast",
-    user     => root,
-    hour     => "0",
-    minute   => "0",
-    weekday  => "0",
-    ensure   => absent,
-    require  => File["/usr/local/sbin/puppetlast"],
-  }
-
   # cron rule to restart puppetmaster before restarting the nodes
   cron { "puppetmaster-restart":
     command  => "/etc/init.d/puppetmaster restart > /dev/null 2>&1",
@@ -109,14 +98,29 @@ class puppetmasterd {
     ensure   => absent,
   }
 
+  # cron rule to execute puppetlast once a week as a report
+  # currently not working for puppet 2.6.x
+  cron { "puppetlast":
+    command  => "/usr/local/sbin/puppetlast",
+    user     => root,
+    hour     => "0",
+    minute   => "0",
+    weekday  => "0",
+    ensure   => $puppetversion ? {
+      "0.25.4" => present,
+      default  => absent,
+    },
+    require  => File["/usr/local/sbin/puppetlast"],
+  }
+  
   # custom puppetlast command, thanks to immerda module:
   # http://git.puppet.immerda.ch/?p=module-puppet.git;a=summary
   #
   # right now it's not working, see
   # https://labs.riseup.net/code/issues/2515
   file { "/usr/local/sbin/puppetlast":
-    ensure => absent,
     source => "puppet:///modules/puppet/lastruncheck",
+    ensure => absent,
     owner  => root,
     group  => root,
     mode   => 0700,