summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/master/lastruncheck8
1 files changed, 5 insertions, 3 deletions
diff --git a/files/master/lastruncheck b/files/master/lastruncheck
index babe74f..9eff27e 100644
--- a/files/master/lastruncheck
+++ b/files/master/lastruncheck
@@ -23,9 +23,11 @@ module Puppet::Lastcheck
def facts_hosts
return @facts_hosts if @facts_hosts
require 'puppet/indirector/facts/yaml'
- @facts_hosts = Puppet::Node::Facts.search("*").collect do |node|
- { :hostname => node.name, :expired => node.expired?, :timestamp => node.values[:_timestamp], :expiration => node.expiration }
- end
+ @facts_hosts = Puppet::Node::Facts.search("*").collect do |fqdn|
+ if node = Puppet::Node::Facts.search(fqdn)
+ { :hostname => node.name, :expired => node.expired?, :timestamp => node.values[:_timestamp], :expiration => node.expiration }
+ end
+ end.compact
end
end
end