summaryrefslogtreecommitdiffstats
path: root/lib/puppet/client
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-05 18:33:20 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-05 18:33:20 +0000
commit46fbf95b16622d33bcb791f0489bee1f87fb33e5 (patch)
treeeb8393d65ba723e0998073fd963748da7c0c54dc /lib/puppet/client
parentb303e8d3b7c31ebccabb0b3238104f5f019c5b6a (diff)
downloadpuppet-46fbf95b16622d33bcb791f0489bee1f87fb33e5.tar.gz
puppet-46fbf95b16622d33bcb791f0489bee1f87fb33e5.tar.xz
puppet-46fbf95b16622d33bcb791f0489bee1f87fb33e5.zip
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
Diffstat (limited to 'lib/puppet/client')
-rw-r--r--lib/puppet/client/master.rb16
1 files changed, 12 insertions, 4 deletions
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