From 84d4ee9db697e35299b5c9d157bb818af1088416 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 3 Apr 2011 14:12:05 +0200 Subject: fix lastruncheck to be compatible for 2.6.7 --- files/master/lastruncheck | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'files/master/lastruncheck') 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 -- cgit v1.2.3