diff options
author | mh <mh@immerda.ch> | 2008-12-27 21:07:57 +0000 |
---|---|---|
committer | mh <mh@immerda.ch> | 2008-12-27 21:07:57 +0000 |
commit | dd1df64d3f6dc682129c737daa695d38c10e37ab (patch) | |
tree | 0851d6e25f6bd9926c49c83235c282c3af31681f /files/master/puppetlast | |
parent | a0f01b850db57741ae5aaf58a649dd9b18e44f9b (diff) |
added --all option to display all
Diffstat (limited to 'files/master/puppetlast')
-rw-r--r-- | files/master/puppetlast | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/files/master/puppetlast b/files/master/puppetlast index f547069..99a760e 100644 --- a/files/master/puppetlast +++ b/files/master/puppetlast @@ -12,7 +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| - if ((Time.now - node.values[:_timestamp]) / 60).floor > 720 then - puts "#{node.name} #{node.expired? ? 'cached expired, ' : ''}last checked #{((Time.now - node.values[:_timestamp]) / 60).floor} minutes ago" - end + puts "#{node.name} #{node.expired? ? 'cached expired, ' : ''}last checked #{((Time.now - node.values[:_timestamp]) / 60).floor} minutes ago" if (((Time.now - node.values[:_timestamp]) / 60).floor > 60 or (not ARGV[0].nil? and ARGV[0].to_s == '--all')) end |