diff options
-rw-r--r-- | lib/puppet/application/agent.rb | 4 | ||||
-rw-r--r-- | lib/puppet/defaults.rb | 1 | ||||
-rwxr-xr-x | lib/puppet/node/facts.rb | 3 | ||||
-rwxr-xr-x | spec/unit/application/agent.rb | 5 |
4 files changed, 8 insertions, 5 deletions
diff --git a/lib/puppet/application/agent.rb b/lib/puppet/application/agent.rb index 609a4580a..8353dd89f 100644 --- a/lib/puppet/application/agent.rb +++ b/lib/puppet/application/agent.rb @@ -246,9 +246,11 @@ class Puppet::Application::Agent < Puppet::Application # You can still override this on the command-line with, e.g., :compiler. Puppet[:catalog_terminus] = :rest + # Override the default. + Puppet[:fact_terminus] = :facter + Puppet::Resource::Catalog.cache_class = :yaml - Puppet::Node::Facts.terminus_class = :facter # We need tomake the client either way, we just don't start it # if --no-client is set. diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index 3f9ac4da2..f77427583 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -116,6 +116,7 @@ module Puppet :node_terminus => ["plain", "Where to find information about nodes."], :catalog_terminus => ["compiler", "Where to get node catalogs. This is useful to change if, for instance, you'd like to pre-compile catalogs and store them in memcached or some other easily-accessed store."], + :fact_terminus => ["facter", "Where to get node facts."], :httplog => { :default => "$logdir/http.log", :owner => "root", :mode => 0640, diff --git a/lib/puppet/node/facts.rb b/lib/puppet/node/facts.rb index 490174bbf..7c1a188ec 100755 --- a/lib/puppet/node/facts.rb +++ b/lib/puppet/node/facts.rb @@ -16,8 +16,7 @@ class Puppet::Node::Facts end end - # Use the node source as the indirection terminus. - indirects :facts, :terminus_class => :facter, :extend => NodeExpirer + indirects :facts, :terminus_setting => :fact_terminus, :extend => NodeExpirer attr_accessor :name, :values diff --git a/spec/unit/application/agent.rb b/spec/unit/application/agent.rb index 598492bc7..f93424258 100755 --- a/spec/unit/application/agent.rb +++ b/spec/unit/application/agent.rb @@ -183,6 +183,7 @@ describe Puppet::Application::Agent do Puppet.stubs(:info) FileTest.stubs(:exists?).returns(true) Puppet.stubs(:[]) + Puppet.stubs(:[]=) Puppet.stubs(:[]).with(:libdir).returns("/dev/null/lib") Puppet.settings.stubs(:print_config?) Puppet.settings.stubs(:print_config) @@ -333,8 +334,8 @@ describe Puppet::Application::Agent do @puppetd.setup end - it "should tell the facts to use facter" do - Puppet::Node::Facts.expects(:terminus_class=).with(:facter) + it "should change the fact_terminus setting to 'facter'" do + Puppet.expects(:[]=).with(:fact_terminus, :facter) @puppetd.setup end |