diff options
Diffstat (limited to 'lib/puppet/network/client/master.rb')
-rw-r--r-- | lib/puppet/network/client/master.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/puppet/network/client/master.rb b/lib/puppet/network/client/master.rb index ea351ddc3..e0a51513c 100644 --- a/lib/puppet/network/client/master.rb +++ b/lib/puppet/network/client/master.rb @@ -436,6 +436,21 @@ class Puppet::Network::Client::Master < Puppet::Network::Client Puppet.warning "Could not load #{type} %s: %s" % [fqfile, detail] end end + ensure + # For some reason, the libdir doesn't end up in the load path + # reliably, so we might need to add it here to make sure those shiny + # new facts get picked up by My Friend Facter. + $:.unshift(Puppet[:libdir]) unless $:.include?(Puppet[:libdir]) + # Reload everything. + Facter.clear + if Facter.respond_to? :loadfacts + Facter.loadfacts + elsif Facter.respond_to? :load + Facter.load + else + raise Puppet::Error, + "You must upgrade your version of Facter to use centralized facts" + end end def self.loadfacts |