[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.6-1-356-g5718585

James Turnbull james at lovedthanlost.net
Fri Jan 23 14:20:44 UTC 2009


The following commit has been merged in the master branch:
commit c97389d5f6748c05b88f6461b87b4d21a273ab00
Author: AJ Christensen <aj at junglist.gen.nz>
Date:   Wed Jul 30 11:36:43 2008 +1200

    Made puppetlast work on 0.24.5 by using the YAML indirector

diff --git a/ext/puppetlast b/ext/puppetlast
index e8c2ea1..848fdde 100755
--- a/ext/puppetlast
+++ b/ext/puppetlast
@@ -1,15 +1,14 @@
 #!/usr/bin/env ruby
+# Puppetlast, a script to output the last check-in time of nodes. Also outputs the cached configuration state, if expired or not.
 #
-# Script to print out when puppet ran successfully last
-# AJ Christensen <aj at junglist.gen.nz>
+# AJ "Fujin" Christensen <aj at junglist.gen.nz>
 #
-
 require 'puppet'
-require 'puppet/defaults'
-require 'yaml'
 
 Puppet[:config] = "/etc/puppet/puppet.conf"
 Puppet.parse_config
+Puppet[:name] = "puppetmasterd"
+Puppet::Node::Facts.terminus_class = :yaml
 
 print "puppetlast\n"
 
@@ -37,4 +36,7 @@ if yfdir
       print 'error: ' + $! + "\n"
    end
 
+Puppet::Node::Facts.search("*").sort.each do |node|
+  puts "#{node.name} #{node.expired? ? 'cached expired, ' : ''}checked in #{((Time.now - node.values[:_timestamp]) / 60).floor} minutes ago"
 end
+

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list