[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 2.6.5-303-gfcfa26a

Paul Berry paul at puppetlabs.com
Thu Mar 17 10:46:53 UTC 2011


The following commit has been merged in the upstream branch:
commit 8a485608e2941ff8c7ecc706c21f906d59302dd6
Author: Matt Robinson <matt at puppetlabs.com>
Date:   Fri Nov 5 11:37:27 2010 -0700

    (#5150) Make fact REST terminus configurable to connect to inventory service
    
    Puppet masters can now set the inventory_server and inventory_port
    option to point to another puppet master that will function as the
    central inventory service.  When agents connect to the
    puppet master, this will send fact data from the puppet master over REST
    to the inventory service.
    
    The puppet master itself will still store the client fact data in the
    local yaml dir by setting the cache class to yaml.
    
    Getting puppet masters to talk to each other using certs is difficult.
    
    Paired-with: Jesse Wolfe <jesse at puppetlabs.com>

diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 0b0de43..8da1040 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -119,7 +119,16 @@ 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."],
-    :facts_terminus => [Puppet.application_name.to_s == "master" ? 'yaml' : 'facter', "The node facts terminus."],
+    :facts_terminus => {
+      :default => Puppet.application_name.to_s == "master" ? 'yaml' : 'facter', 
+      :desc => "The node facts terminus.",
+      :hook => proc do |value|
+        require 'puppet/node/facts'
+        if value.to_s == "rest"
+          Puppet::Node::Facts.cache_class = :yaml
+        end
+      end
+    },
     :inventory_terminus => [ "$facts_terminus", "Should usually be the same as the facts terminus" ],
     :httplog => { :default => "$logdir/http.log",
       :owner => "root",
@@ -583,11 +592,17 @@ module Puppet
       end
     },
     :report_server => ["$server",
-      "The server to which to send transaction reports."
+      "The server to send transaction reports to."
     ],
     :report_port => ["$masterport",
       "The port to communicate with the report_server."
     ],
+    :inventory_server => ["$server",
+      "The server to send facts to."
+    ],
+    :inventory_port => ["$masterport",
+      "The port to communicate with the inventory_server."
+    ],
     :report => [false,
       "Whether to send reports after every transaction."
     ],
diff --git a/lib/puppet/indirector/facts/rest.rb b/lib/puppet/indirector/facts/rest.rb
index 07491fc..e2afa14 100644
--- a/lib/puppet/indirector/facts/rest.rb
+++ b/lib/puppet/indirector/facts/rest.rb
@@ -3,4 +3,6 @@ require 'puppet/indirector/rest'
 
 class Puppet::Node::Facts::Rest < Puppet::Indirector::REST
   desc "Find and save facts about nodes over HTTP via REST."
+  use_server_setting(:inventory_server)
+  use_port_setting(:inventory_port)
 end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list