summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/client/master.rb16
-rw-r--r--lib/puppet/config.rb1
-rwxr-xr-xlib/puppet/daemon.rb4
-rw-r--r--lib/puppet/transaction.rb4
-rw-r--r--test/other/transactions.rb4
5 files changed, 17 insertions, 12 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
diff --git a/lib/puppet/config.rb b/lib/puppet/config.rb
index 3c2f20e1a..2817ce612 100644
--- a/lib/puppet/config.rb
+++ b/lib/puppet/config.rb
@@ -588,6 +588,7 @@ Generated on #{Time.now}.
Puppet[:tags] = ""
end
trans = objects.evaluate
+ trans.ignoretags = true
trans.evaluate
if tags
Puppet[:tags] = tags
diff --git a/lib/puppet/daemon.rb b/lib/puppet/daemon.rb
index 79241deb6..a19124545 100755
--- a/lib/puppet/daemon.rb
+++ b/lib/puppet/daemon.rb
@@ -48,8 +48,8 @@ module Puppet
def fqdn
unless defined? @fqdn and @fqdn
- hostname = Facter["hostname"].value
- domain = Facter["domain"].value
+ hostname = Facter.value("hostname")
+ domain = Facter.value("domain")
@fqdn = [hostname, domain].join(".")
end
return @fqdn
diff --git a/lib/puppet/transaction.rb b/lib/puppet/transaction.rb
index 899aaa456..b9a9376e8 100644
--- a/lib/puppet/transaction.rb
+++ b/lib/puppet/transaction.rb
@@ -6,7 +6,7 @@ require 'puppet/statechange'
module Puppet
class Transaction
- attr_accessor :component, :objects, :tags, :ignoreschedules
+ attr_accessor :component, :objects, :tags, :ignoreschedules, :ignoretags
include Puppet::Util
@@ -160,7 +160,7 @@ class Transaction
begin
allevents = @objects.collect { |child|
events = nil
- if (tags.nil? or child.tagged?(tags))
+ if (self.ignoretags or tags.nil? or child.tagged?(tags))
if self.ignoreschedules or child.scheduled?
@objectmetrics[:scheduled] += 1
# Perform the actual changes
diff --git a/test/other/transactions.rb b/test/other/transactions.rb
index 02acaa8e7..aea593c1f 100644
--- a/test/other/transactions.rb
+++ b/test/other/transactions.rb
@@ -13,10 +13,6 @@ require 'test/unit'
class TestTransactions < Test::Unit::TestCase
include FileTesting
- # In case they're not in more than one group
- def test_nothing
- end
-
def test_reports
path1 = tempfile()
path2 = tempfile()