Since 0.25.0 node's timestamps have to be parsed before processing. Signed-off-by: Peter Meier <[email protected]> --- ext/puppetlast | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ext/puppetlast b/ext/puppetlast index e52529d..e949676 100755 --- a/ext/puppetlast +++ b/ext/puppetlast @@ -4,6 +4,7 @@ # AJ "Fujin" Christensen <[email protected]> # require 'puppet' +require 'time' Puppet[:config] = "/etc/puppet/puppet.conf" Puppet.parse_config @@ -11,5 +12,5 @@ Puppet[:name] = "puppetmasterd" Puppet::Node::Facts.terminus_class = :yaml Puppet::Node::Facts.search("*").sort { |a,b| a.name <=> b.name }.each do |node| - puts "#{node.name} #{node.expired? ? 'cached expired, ' : ''}checked in #{((Time.now - node.values[:_timestamp]) / 60).floor} minutes ago" + puts "#{node.name} #{node.expired? ? 'cached expired, ' : ''}checked in #{((Time.now - Time.parse(node.values[:_timestamp])) / 60).floor} minutes ago" end -- 1.6.3.3 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
