From 46fbf95b16622d33bcb791f0489bee1f87fb33e5 Mon Sep 17 00:00:00 2001 From: luke Date: Tue, 5 Sep 2006 18:33:20 +0000 Subject: Adding an "ignoretags" attribute to transaction, and setting it for downloading plugins or facts, and for creating config directories git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1562 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/client/master.rb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'lib/puppet/client') diff --git a/lib/puppet/client/master.rb b/lib/puppet/client/master.rb index ba6e7ec84..8ab251728 100644 --- a/lib/puppet/client/master.rb +++ b/lib/puppet/client/master.rb @@ -78,7 +78,7 @@ class Puppet::Client::MasterClient < Puppet::Client def self.facts # Retrieve the facts from the central server. if Puppet[:factsync] - self.class.getfacts() + self.getfacts() end facts = {} @@ -517,6 +517,7 @@ class Puppet::Client::MasterClient < Puppet::Client begin trans = objects.evaluate + trans.ignoretags = true trans.evaluate rescue Puppet::Error => detail if Puppet[:debug] @@ -541,18 +542,25 @@ class Puppet::Client::MasterClient < Puppet::Client Facter.clear path = Puppet[:factpath].split(":") + files = [] download(:dest => Puppet[:factdest], :source => Puppet[:factsource], :ignore => Puppet[:factsignore], :name => "fact") do |object| next unless path.include?(File.dirname(object[:path])) + files << object[:path] + + end + + Facter.clear + files.each do |file| begin Puppet.info "Loading fact %s" % - File.basename(File.basename(object[:path])).sub(".rb",'') - load object[:path] + File.basename(File.basename(file)).sub(".rb",'') + load file rescue => detail Puppet.warning "Could not reload fact %s: %s" % - [object[:path], detail] + [file, detail] end end ensure -- cgit