[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

Markus Roberts Markus at reality.com
Wed Jul 14 10:29:56 UTC 2010


The following commit has been merged in the upstream branch:
commit 27322e5460130b854835aef56ab7076bab83a00b
Merge: 70c71c58c1dd038d033d5fdd3fecc8f15b11fd52 71653a74d91b1e6e9845b4a41249861319c0d6b0
Author: Markus Roberts <Markus at reality.com>
Date:   Tue Feb 9 15:17:53 2010 -0800

    Merge branch '0.25.x'
    
    Conflicts:
    	lib/puppet/agent.rb
    	lib/puppet/application/puppet.rb
    	lib/puppet/configurer.rb
    	man/man5/puppet.conf.5
    	spec/integration/defaults.rb
    	spec/unit/configurer.rb

diff --combined lib/puppet/agent.rb
index 0960737,c188719..f712bbd
--- a/lib/puppet/agent.rb
+++ b/lib/puppet/agent.rb
@@@ -48,16 -48,16 +48,18 @@@ class Puppet::Agen
              return
          end
          splay
 +        result = nil
          with_client do |client|
              begin
 -                sync.synchronize { lock { client.run(*args) } }
 +                sync.synchronize { lock { result = client.run(*args) } }
+             rescue SystemExit,NoMemoryError
+                 raise
              rescue Exception => detail
                  puts detail.backtrace if Puppet[:trace]
                  Puppet.err "Could not run %s: %s" % [client_class, detail]
              end
          end
 +        result
      end
  
      def stop
@@@ -124,6 -124,8 +126,8 @@@
      def with_client
          begin
              @client = client_class.new
+         rescue SystemExit,NoMemoryError
+             raise
          rescue Exception => detail
              puts detail.backtrace if Puppet[:trace]
              Puppet.err "Could not create instance of %s: %s" % [client_class, detail]
diff --combined lib/puppet/application/puppet.rb
index e4baf5d,273c7d0..2f7946b
--- a/lib/puppet/application/puppet.rb
+++ b/lib/puppet/application/puppet.rb
@@@ -1,5 -1,6 +1,6 @@@
  require 'puppet'
  require 'puppet/application'
+ require 'puppet/configurer'
  require 'puppet/network/handler'
  require 'puppet/network/client'
  
@@@ -124,19 -125,23 +125,23 @@@ Puppet::Application.new(:puppet) d
  
              catalog.retrieval_duration = Time.now - starttime
  
+             configurer = Puppet::Configurer.new
+             configurer.execute_prerun_command
+ 
              # And apply it
              transaction = catalog.apply
  
+             configurer.execute_postrun_command
+ 
+             status = 0
              if not Puppet[:noop] and options[:detailed_exitcodes] then
                  transaction.generate_report
 -                status |= 2 if transaction.report.metrics["changes"][:total] > 0
 -                status |= 4 if transaction.report.metrics["resources"][:failed] > 0
 +                exit(transaction.report.exit_status)
 +            else
 +                exit(0)
              end
 -            exit(status)
          rescue => detail
-             if Puppet[:trace]
-                 puts detail.backtrace
-             end
+             puts detail.backtrace if Puppet[:trace]
              if detail.is_a?(XMLRPC::FaultException)
                  $stderr.puts detail.message
              else
diff --combined lib/puppet/configurer.rb
index 350e9c3,61c6f02..8179d2c
--- a/lib/puppet/configurer.rb
+++ b/lib/puppet/configurer.rb
@@@ -5,6 -5,8 +5,8 @@@ require 'puppet/network/http_pool
  require 'puppet/util'
  
  class Puppet::Configurer
+     class CommandHookError < RuntimeError; end
+ 
      require 'puppet/configurer/fact_handler'
      require 'puppet/configurer/plugin_handler'
  
@@@ -14,6 -16,7 +16,6 @@@
      # For benchmarking
      include Puppet::Util
  
 -    attr_accessor :catalog
      attr_reader :compile_time
  
      # Provide more helpful strings to the logging that the Agent does
@@@ -33,6 -36,19 +35,19 @@@
          Puppet[:puppetdlockfile]
      end
  
+     def clear
+         @catalog.clear(true) if @catalog
+         @catalog = nil
+     end
+ 
+     def execute_postrun_command
+         execute_from_setting(:postrun_command)
+     end
+ 
+     def execute_prerun_command
+         execute_from_setting(:prerun_command)
+     end
+ 
      # Initialize and load storage
      def dostorage
          begin
@@@ -62,10 -78,6 +77,10 @@@
          @splayed = false
      end
  
 +    def initialize_report
 +        Puppet::Transaction::Report.new
 +    end
 +
      # Prepare for catalog retrieval.  Downloads everything necessary, etc.
      def prepare
          dostorage()
@@@ -73,6 -85,8 +88,8 @@@
          download_plugins()
  
          download_fact_plugins()
+ 
+         execute_prerun_command
      end
  
      # Get the remote catalog, yo.  Returns nil if no catalog can be found.
@@@ -91,6 -105,8 +108,8 @@@
              duration = thinmark do
                  result = catalog_class.find(name, fact_options.merge(:ignore_cache => true))
              end
+         rescue SystemExit,NoMemoryError
+             raise
          rescue Exception => detail
              puts detail.backtrace if Puppet[:trace]
              Puppet.err "Could not retrieve catalog from remote server: %s" % detail
@@@ -134,14 -150,13 +153,16 @@@
      def run(options = {})
          begin
              prepare()
+         rescue SystemExit,NoMemoryError
+             raise
          rescue Exception => detail
              puts detail.backtrace if Puppet[:trace]
              Puppet.err "Failed to prepare catalog: %s" % detail
          end
  
 +        report = initialize_report()
 +        Puppet::Util::Log.newdestination(report)
 +
          if catalog = options[:catalog]
              options.delete(:catalog)
          elsif ! catalog = retrieve_catalog
@@@ -149,35 -164,20 +170,36 @@@
              return
          end
  
 +        transaction = nil
 +
          begin
              benchmark(:notice, "Finished catalog run") do
 -                catalog.apply(options)
 +                transaction = catalog.apply(options)
              end
 +            report
          rescue => detail
              puts detail.backtrace if Puppet[:trace]
              Puppet.err "Failed to apply catalog: %s" % detail
 +            return
          end
 -
 +    ensure
          # Now close all of our existing http connections, since there's no
          # reason to leave them lying open.
          Puppet::Network::HttpPool.clear_http_instances
 -    ensure
+         execute_postrun_command
 +
 +        Puppet::Util::Log.close(report)
 +
 +        send_report(report, transaction)
 +    end
 +
 +    def send_report(report, trans = nil)
 +        trans.add_metrics_to_report(report) if trans
 +        puts report.summary if Puppet[:summarize]
 +        report.save() if Puppet[:report]
 +    rescue => detail
 +        puts detail.backtrace if Puppet[:trace]
 +        Puppet.err "Could not send report: #{detail}"
      end
  
      private
@@@ -198,4 -198,14 +220,14 @@@
  
          return timeout
      end
+ 
+     def execute_from_setting(setting)
+         return if (command = Puppet[setting]) == ""
+ 
+         begin
+             Puppet::Util.execute([command])
+         rescue => detail
+             raise CommandHookError, "Could not run command from #{setting}: #{detail}"
+         end
+     end
  end
diff --combined lib/puppet/defaults.rb
index ca4b9b8,d4a5a18..b2e8492
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@@ -159,9 -159,6 +159,6 @@@ module Puppe
              may need to use a FQDN for the server hostname when using a proxy."],
          :http_proxy_port => [3128,
              "The HTTP proxy port to use for outgoing connections"],
-         :http_enable_post_connection_check => [true,
-             "Boolean; whether or not puppetd should validate the server
-             SSL certificate against the request hostname."],
          :filetimeout => [ 15,
              "The minimum time to wait (in seconds) between checking for updates in
              configuration files.  This timeout determines how quickly Puppet checks whether
@@@ -199,7 -196,12 +196,12 @@@
              reports, allowing you to correlate changes on your hosts to the source version on the server."],
          :zlib => [true, 
              "Boolean; whether to use the zlib library",
-         ]
+         ],
+         :prerun_command => ["", "A command to run before every agent run.  If this command returns a non-zero
+             return code, the entire Puppet run will fail."],
+         :postrun_command => ["", "A command to run after every agent run.  If this command returns a non-zero
+             return code, the entire Puppet run will be considered to have failed, even though it might have
+             performed work during the normal run."]
      )
  
      hostname = Facter["hostname"].value
@@@ -291,7 -293,6 +293,7 @@@
      )
  
      setdefaults(:ca,
 +        :ca_name => ["$certname", "The name to use the Certificate Authority certificate."],
          :cadir => {  :default => "$ssldir/ca",
              :owner => "service",
              :group => "service",
@@@ -674,9 -675,6 +676,9 @@@
              used when networked databases are used."],
          :dbsocket => [ "", "The database socket location. Only used when networked
              databases are used.  Will be ignored if the value is an empty string."],
 +        :dbconnections => [ 0, "The number of database connections. Only used when
 +            networked databases are used.  Will be ignored if the value is an empty
 +            string or is less than 1."],
          :railslog => {:default => "$logdir/rails.log",
              :mode => 0600,
              :owner => "service",
diff --combined lib/puppet/provider/augeas/augeas.rb
index 78be1d7,d586fc1..7a7d55d
--- a/lib/puppet/provider/augeas/augeas.rb
+++ b/lib/puppet/provider/augeas/augeas.rb
@@@ -39,6 -39,7 +39,7 @@@ Puppet::Type.type(:augeas).provide(:aug
        "match" => [ :path, :glob ],
        "size" => [:comparator, :int],
        "include" => [:string],
+       "not_include" => [:string],
        "==" => [:glob],
        "!=" => [:glob]
      }
@@@ -133,7 -134,6 +134,7 @@@
          unless @aug
              flags = Augeas::NONE
              flags = Augeas::TYPE_CHECK if resource[:type_check] == :true
 +            flags |= Augeas::NO_MODL_AUTOLOAD if resource[:incl]
              root = resource[:root]
              load_path = resource[:load_path]
              debug("Opening augeas with root #{root}, lens path #{load_path}, flags #{flags}")
@@@ -142,12 -142,6 +143,12 @@@
              if get_augeas_version >= "0.3.6"
                  debug("Augeas version #{get_augeas_version} is installed")
              end
 +
 +            if resource[:incl]
 +                aug.set("/augeas/load/Xfm/lens", resource[:lens])
 +                aug.set("/augeas/load/Xfm/incl", resource[:incl])
 +                aug.load
 +            end
          end
          @aug
      end
@@@ -203,6 -197,8 +204,8 @@@
  
          #Get the values from augeas
          result = @aug.match(path) || []
+         fail("Error trying to match path '#{path}'") if (result == -1)
+ 
          # Now do the work
          case verb
          when "size"
@@@ -213,6 -209,9 +216,9 @@@
          when "include"
              arg = clause_array.shift
              return_value = result.include?(arg)
+         when "not_include"
+             arg = clause_array.shift
+             return_value = !result.include?(arg)
          when "=="
              begin
                  arg = clause_array.shift
@@@ -261,6 -260,8 +267,8 @@@
                      when "get"; return_value = process_get(cmd_array)
                      when "match"; return_value = process_match(cmd_array)
                      end
+                 rescue SystemExit,NoMemoryError
+                     raise
                  rescue Exception => e
                      fail("Error sending command '#{command}' with params #{cmd_array[1..-1].inspect}/#{e.message}")
                  end
@@@ -322,13 -323,16 +330,16 @@@
                  case command
                      when "set"
                          debug("sending command '#{command}' with params #{cmd_array.inspect}")
-                         aug.set(cmd_array[0], cmd_array[1])
+                         rv = aug.set(cmd_array[0], cmd_array[1])
+                         fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv)
                      when "rm", "remove"
                          debug("sending command '#{command}' with params #{cmd_array.inspect}")
-                         aug.rm(cmd_array[0])
+                         rv = aug.rm(cmd_array[0])
+                         fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv)
                      when "clear"
                          debug("sending command '#{command}' with params #{cmd_array.inspect}")
-                         @aug.clear(cmd_array[0])
+                         rv = aug.clear(cmd_array[0])
+                         fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv == -1)
                      when "insert", "ins"
                          label = cmd_array[0]
                          where = cmd_array[1]
@@@ -339,9 -343,12 +350,12 @@@
                              else fail("Invalid value '#{where}' for where param")
                          end
                          debug("sending command '#{command}' with params #{[label, where, path].inspect}")
-                         aug.insert(path, label, before)
+                         rv = aug.insert(path, label, before)
+                         fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv == -1)
                      else fail("Command '#{command}' is not supported")
                  end
+             rescue SystemExit,NoMemoryError
+                 raise
              rescue Exception => e
                  fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}")
              end
diff --combined lib/puppet/ssl/host.rb
index 5de2c5a,7d34a4f..8d44ffe
--- a/lib/puppet/ssl/host.rb
+++ b/lib/puppet/ssl/host.rb
@@@ -10,7 -10,6 +10,7 @@@ require 'puppet/util/cacher
  class Puppet::SSL::Host
      # Yay, ruby's strange constant lookups.
      Key = Puppet::SSL::Key
 +    CA_NAME = Puppet::SSL::CA_NAME
      Certificate = Puppet::SSL::Certificate
      CertificateRequest = Puppet::SSL::CertificateRequest
      CertificateRevocationList = Puppet::SSL::CertificateRevocationList
@@@ -31,6 -30,7 +31,6 @@@
          end
      end
  
 -    CA_NAME = "ca"
      # This is the constant that people will use to mark that a given host is
      # a certificate authority.
      def self.ca_name
@@@ -205,7 -205,7 +205,7 @@@
              @ssl_store.add_file(Puppet[:localcacert])
  
              # If there's a CRL, add it to our store.
 -            if crl = Puppet::SSL::CertificateRevocationList.find("ca")
 +            if crl = Puppet::SSL::CertificateRevocationList.find(CA_NAME)
                  @ssl_store.flags = OpenSSL::X509::V_FLAG_CRL_CHECK_ALL|OpenSSL::X509::V_FLAG_CRL_CHECK
                  @ssl_store.add_crl(crl.content)
              end
@@@ -220,6 -220,8 +220,8 @@@
              return if certificate
              generate
              return if certificate
+         rescue SystemExit,NoMemoryError
+             raise
          rescue Exception => detail
              Puppet.err "Could not request certificate: %s" % detail.to_s
              if time < 1
diff --combined lib/puppet/type/augeas.rb
index b8d08bb,cfd1da5..c2b164e
--- a/lib/puppet/type/augeas.rb
+++ b/lib/puppet/type/augeas.rb
@@@ -58,15 -58,10 +58,15 @@@ Puppet::Type.newtype(:augeas) d
      end
  
      newparam (:context) do
 -        desc "Optional context path. This value is pre-pended to the paths of all changes if the
 -              path is relative. So a path specified as /files/foo will not be prepended with the
 -              context whild files/foo will be prepended"
 +        desc "Optional context path. This value is prepended to the paths of all changes if the path is relative. If INCL is set, defaults to '/files' + INCL, otherwise the empty string"
          defaultto ""
 +        munge do |value|
 +            if value.empty? and resource[:incl]
 +                "/files" + resource[:incl]
 +            else
 +                value
 +            end
 +        end
      end
  
      newparam (:onlyif) do
@@@ -76,6 -71,7 +76,7 @@@
                 get [AUGEAS_PATH] [COMPARATOR] [STRING]
                 match [MATCH_PATH] size [COMPARATOR] [INT]
                 match [MATCH_PATH] include [STRING]
+                match [MATCH_PATH] not_include [STRING]
                 match [MATCH_PATH] == [AN_ARRAY]
                 match [MATCH_PATH] != [AN_ARRAY]
  
@@@ -134,22 -130,6 +135,22 @@@
          defaultto :false
      end
  
 +    newparam(:lens) do
 +        desc "Use a specific lens, e.g. 'Hosts.lns'. When this parameter is set, you must also set the incl parameter to indicate which file to load. Only that file will be loaded, which greatly speeds up execution of the type"
 +    end
 +
 +    newparam(:incl) do
 +        desc "Load only a specific file, e.g. '/etc/hosts'.  When this parameter is set, you must also set the lens parameter to indicate which lens to use."
 +    end
 +
 +    validate do
 +        has_lens = !self[:lens].nil?
 +        has_incl = !self[:incl].nil?
 +        if has_lens != has_incl
 +            self.fail "You must specify both the lens and incl parameters, or neither"
 +        end
 +    end
 +
      # This is the acutal meat of the code. It forces
      # augeas to be run and fails or not based on the augeas return
      # code.
diff --combined man/man5/puppet.conf.5
index 2f07eb0,2d73ccf..b762e40
--- a/man/man5/puppet.conf.5
+++ b/man/man5/puppet.conf.5
@@@ -1,49 -1,56 +1,56 @@@
- .TH Configuration Reference  "" "" ""
+ .TH CONFIGURATION REFERENCE  "" "" ""
  .SH NAME
  Configuration Reference \- 
  .\" Man page generated from reStructeredText.
- \fPThis page is autogenerated; any changes will get overwritten\fP \fI(last generated on Wed Dec 30 19:31:12 \-0500 2009)\fP
- 
- 
- .\" topic: Contents
- .\" 
- .\" Specifying Configuration Parameters
- .\" 
- .\" Signals
- .\" 
- .\" Configuration Parameter Reference
- 
- .SH Specifying Configuration Parameters
- 
+ .
+ .sp
+ \fBThis page is autogenerated; any changes will get overwritten\fP \fI(last generated on Mon Feb 08 23:57:07 +1100 2010)\fP
+ .SS Contents
+ .INDENT 0.0
+ .IP \(bu 2
+ .
+ \fI\%Specifying Configuration Parameters\fP
+ .IP \(bu 2
+ .
+ \fI\%Signals\fP
+ .IP \(bu 2
+ .
+ \fI\%Configuration Parameter Reference\fP
+ .UNINDENT
+ .SH SPECIFYING CONFIGURATION PARAMETERS
  .SS On The Command\-Line
+ .sp
  Every Puppet executable (with the exception of \fBpuppetdoc\fP) accepts all of
  the parameters below, but not all of the arguments make sense for every executable.
- 
+ .sp
  I have tried to be as thorough as possible in the descriptions of the
  arguments, so it should be obvious whether an argument is appropriate or not.
- 
+ .sp
  These parameters can be supplied to the executables either as command\-line
  options or in the configuration file.  For instance, the command\-line
  invocation below would set the configuration directory to \fB/private/puppet\fP:
- 
- 
+ .sp
  .nf
+ .ft C
  $ puppetd \-\-confdir=/private/puppet
+ .ft P
  .fi
+ .sp
  Note that boolean options are turned on and off with a slightly different
  syntax on the command line:
- 
- 
+ .sp
  .nf
+ .ft C
  $ puppetd \-\-storeconfigs
  
  $ puppetd \-\-no\-storeconfigs
+ .ft P
  .fi
+ .sp
  The invocations above will enable and disable, respectively, the storage of
  the client configuration.
- 
- 
  .SS Configuration Files
+ .sp
  As mentioned above, the configuration parameters can also be stored in a
  configuration file, located in the configuration directory.  As root, the
  default configuration directory is \fB/etc/puppet\fP, and as a regular user, the
@@@ -52,1733 -59,1401 +59,1406 @@@ executables look for \fBpuppet.conf\fP 
  (although they previously looked for separate files).  For example,
  \fBpuppet.conf\fP is located at \fB/etc/puppet/puppet.conf\fP as root and
  \fB~user/.puppet/puppet.conf\fP as a regular user by default.
- 
+ .sp
  All executables will set any parameters set within the \fBmain\fP section,
  while each executable will also look for a section named for the executable
  and load those parameters.  For example, \fBpuppetd\fP will look for a
  section named \fBpuppetd\fP, and \fBpuppetmasterd\fP looks for a section
  named \fBpuppetmasterd\fP.  This allows you to use a single configuration file
  to customize the settings for all of your executables.
- 
- 
  .SS File Format
+ .sp
  The file follows INI\-style formatting.  Here is an example of a very simple
  \fBpuppet.conf\fP file:
- 
- 
+ .sp
  .nf
+ .ft C
  [main]
      confdir = /private/puppet
      storeconfigs = true
+ .ft P
  .fi
+ .sp
  Note that boolean parameters must be explicitly specified as \fItrue\fP or
  \fIfalse\fP as seen above.
- 
+ .sp
  If you need to change file parameters (e.g., reset the mode or owner), do
  so within curly braces on the same line:
- 
- 
+ .sp
  .nf
+ .ft C
  [main]
      myfile = /tmp/whatever {owner = root, mode = 644}
+ .ft P
  .fi
- If you\'re starting out with a fresh configuration, you may wish to let
+ .sp
+ If you\(aqre starting out with a fresh configuration, you may wish to let
  the executable generate a template configuration file for you by invoking
  the executable in question with the \fI\-\-genconfig\fP command.  The executable
  will print a template configuration to standard output, which can be
  redirected to a file like so:
- 
- 
+ .sp
  .nf
+ .ft C
  $ puppetd \-\-genconfig > /etc/puppet/puppet.conf
+ .ft P
  .fi
+ .sp
  Note that this invocation will replace the contents of any pre\-existing
  \fIpuppet.conf\fP file, so make a backup of your present config if it contains
  valuable information.
- 
+ .sp
  Like the \fI\-\-genconfig\fP argument, the executables also accept a \fI\-\-genmanifest\fP
  argument, which will generate a manifest that can be used to manage all of
- Puppet\'s directories and files and prints it to standard output.  This can
+ Puppet\(aqs directories and files and prints it to standard output.  This can
  likewise be redirected to a file:
- 
- 
+ .sp
  .nf
+ .ft C
  $ puppetd \-\-genmanifest > /etc/puppet/manifests/site.pp
+ .ft P
  .fi
+ .sp
  Puppet can also create user and group accounts for itself (one \fIpuppet\fP group
  and one \fIpuppet\fP user) if it is invoked as \fIroot\fP with the \fI\-\-mkusers\fP argument:
- 
- 
+ .sp
  .nf
+ .ft C
  $ puppetd \-\-mkusers
+ .ft P
  .fi
- 
- .SH Signals
+ .SH SIGNALS
+ .sp
  The \fBpuppetd\fP and \fBpuppetmasterd\fP executables catch some signals for special
  handling.  Both daemons catch (\fBSIGHUP\fP), which forces the server to restart
  tself.  Predictably, interrupt and terminate (\fBSIGINT\fP and \fBSIGTERM\fP) will shut
  down the server, whether it be an instance of \fBpuppetd\fP or \fBpuppetmasterd\fP.
- 
+ .sp
  Sending the \fBSIGUSR1\fP signal to an instance of \fBpuppetd\fP will cause it to
  immediately begin a new configuration transaction with the server.  This
  signal has no effect on \fBpuppetmasterd\fP.
- 
- 
- .SH Configuration Parameter Reference
+ .SH CONFIGURATION PARAMETER REFERENCE
+ .sp
  Below is a list of all documented parameters.  Not all of them are valid with all
  Puppet executables, but the executables will ignore any inappropriate values.
- 
- 
  .SS async_storeconfigs
- Whether to use a queueing system to provide asynchronous database integration. Requires that \fBpuppetqd\fP be running and that \'PSON\' support for ruby be installed.
- 
+ .sp
+ Whether to use a queueing system to provide asynchronous database integration. Requires that \fBpuppetqd\fP be running and that \(aqPSON\(aq support for ruby be installed.
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS authconfig
+ .sp
  The configuration file that defines the rights to the different namespaces and methods.  This can be used as a coarse\-grained authorization system for both \fBpuppetd\fP and \fBpuppetmasterd\fP.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $confdir/namespaceauth.conf
- 
+ .
+ \fBDefault\fP: $confdir/namespaceauth.conf
  .UNINDENT
- 
  .SS autoflush
+ .sp
  Whether log files should always flush to disk.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS autosign
+ .sp
  Whether to enable autosign.  Valid values are true (which autosigns any key request, and is a very bad idea), false (which never autosigns any key request), and the path to a file, which uses that configuration file to determine which keys to sign.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $confdir/autosign.conf
- 
+ .
+ \fBDefault\fP: $confdir/autosign.conf
  .UNINDENT
- 
  .SS bindaddress
+ .sp
  The address a listening server should bind to.  Mongrel servers default to 127.0.0.1 and WEBrick defaults to 0.0.0.0.
- 
- 
  .SS bucketdir
+ .sp
  Where FileBucket files are stored.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $vardir/bucket
- 
+ .
+ \fBDefault\fP: $vardir/bucket
  .UNINDENT
- 
  .SS ca
+ .sp
  Wether the master should function as a certificate authority.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: true
- 
+ .
+ \fBDefault\fP: true
  .UNINDENT
- 
  .SS ca_days
+ .sp
  How long a certificate should be valid. This parameter is deprecated, use ca_ttl instead
- 
- 
  .SS ca_md
+ .sp
  The type of hash used in certificates.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: md5
- 
+ .
+ \fBDefault\fP: md5
  .UNINDENT
- 
  .SS ca_port
+ .sp
  The port to use for the certificate authority.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $masterport
- 
+ .
+ \fBDefault\fP: $masterport
  .UNINDENT
- 
  .SS ca_server
- The server to use for certificate authority requests.  It\'s a separate server because it cannot and does not need to horizontally scale.
- 
+ .sp
+ The server to use for certificate authority requests.  It\(aqs a separate server because it cannot and does not need to horizontally scale.
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $server
- 
+ .
+ \fBDefault\fP: $server
  .UNINDENT
- 
  .SS ca_ttl
- The default TTL for new certificates; valid values must be an integer, optionally followed by one of the units \'y\' (years of 365 days), \'d\' (days), \'h\' (hours), or \'s\' (seconds). The unit defaults to seconds. If this parameter is set, ca_days is ignored. Examples are \'3600\' (one hour) and \'1825d\', which is the same as \'5y\' (5 years)
- 
+ .sp
+ The default TTL for new certificates; valid values must be an integer, optionally followed by one of the units \(aqy\(aq (years of 365 days), \(aqd\(aq (days), \(aqh\(aq (hours), or \(aqs\(aq (seconds). The unit defaults to seconds. If this parameter is set, ca_days is ignored. Examples are \(aq3600\(aq (one hour) and \(aq1825d\(aq, which is the same as \(aq5y\(aq (5 years)
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: 5y
- 
+ .
+ \fBDefault\fP: 5y
  .UNINDENT
- 
  .SS cacert
+ .sp
  The CA certificate.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $cadir/ca_crt.pem
- 
+ .
+ \fBDefault\fP: $cadir/ca_crt.pem
  .UNINDENT
- 
  .SS cacrl
+ .sp
  The certificate revocation list (CRL) for the CA. Will be used if present but otherwise ignored.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $cadir/ca_crl.pem
- 
+ .
+ \fBDefault\fP: $cadir/ca_crl.pem
  .UNINDENT
- 
  .SS cadir
+ .sp
  The root directory for the certificate authority.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $ssldir/ca
- 
+ .
+ \fBDefault\fP: $ssldir/ca
  .UNINDENT
- 
  .SS cakey
+ .sp
  The CA private key.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $cadir/ca_key.pem
- 
+ .
+ \fBDefault\fP: $cadir/ca_key.pem
  .UNINDENT
- 
  .SS capass
+ .sp
  Where the CA stores the password for the private key
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $caprivatedir/ca.pass
- 
+ .
+ \fBDefault\fP: $caprivatedir/ca.pass
  .UNINDENT
- 
  .SS caprivatedir
+ .sp
  Where the CA stores private certificate information.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $cadir/private
- 
+ .
+ \fBDefault\fP: $cadir/private
  .UNINDENT
- 
  .SS capub
+ .sp
  The CA public key.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $cadir/ca_pub.pem
- 
+ .
+ \fBDefault\fP: $cadir/ca_pub.pem
  .UNINDENT
- 
  .SS casesensitive
+ .sp
  Whether matching in case statements and selectors should be case\-sensitive.  Case insensitivity is handled by downcasing all values before comparison.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS catalog_format
- (Deprecated for \'preferred_serialization_format\') What format to use to dump the catalog.  Only supports \'marshal\' and \'yaml\'.  Only matters on the client, since it asks the server for a specific format.
- 
- 
+ .sp
+ (Deprecated for \(aqpreferred_serialization_format\(aq) What format to use to dump the catalog.  Only supports \(aqmarshal\(aq and \(aqyaml\(aq.  Only matters on the client, since it asks the server for a specific format.
  .SS cert_inventory
+ .sp
  A Complete listing of all certificates
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $cadir/inventory.txt
- 
+ .
+ \fBDefault\fP: $cadir/inventory.txt
  .UNINDENT
- 
  .SS certdir
+ .sp
  The certificate directory.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $ssldir/certs
- 
+ .
+ \fBDefault\fP: $ssldir/certs
  .UNINDENT
- 
  .SS certdnsnames
- The DNS names on the Server certificate as a colon\-separated list. If it\'s anything other than an empty string, it will be used as an alias in the created certificate.  By default, only the server gets an alias set up, and only for \'puppet\'.
- 
- 
+ .sp
+ The DNS names on the Server certificate as a colon\-separated list. If it\(aqs anything other than an empty string, it will be used as an alias in the created certificate.  By default, only the server gets an alias set up, and only for \(aqpuppet\(aq.
  .SS certname
+ .sp
  The name to use when handling certificates.  Defaults to the fully qualified domain name.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: pelin.lovedthanlost.net
- 
+ .
+ \fBDefault\fP: absinthe.lovedthanlost.net
  .UNINDENT
- 
  .SS classfile
+ .sp
  The file in which puppetd stores a list of the classes associated with the retrieved configuration.  Can be loaded in the separate \fBpuppet\fP executable using the \fB\-\-loadclasses\fP option.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $statedir/classes.txt
- 
+ .
+ \fBDefault\fP: $statedir/classes.txt
  .UNINDENT
- 
  .SS clientbucketdir
+ .sp
  Where FileBucket files are stored locally.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $vardir/clientbucket
- 
+ .
+ \fBDefault\fP: $vardir/clientbucket
  .UNINDENT
- 
  .SS clientyamldir
+ .sp
  The directory in which client\-side YAML data is stored.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $vardir/client_yaml
- 
+ .
+ \fBDefault\fP: $vardir/client_yaml
  .UNINDENT
- 
  .SS code
- Code to parse directly.  This is essentially only used by \fBpuppet\fP, and should only be set if you\'re writing your own Puppet executable
- 
- 
+ .sp
+ Code to parse directly.  This is essentially only used by \fBpuppet\fP, and should only be set if you\(aqre writing your own Puppet executable
  .SS color
+ .sp
  Whether to use colors when logging to the console. Valid values are \fBansi\fP (equivalent to \fBtrue\fP), \fBhtml\fP (mostly used during testing with TextMate), and \fBfalse\fP, which produces no color.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: ansi
- 
+ .
+ \fBDefault\fP: ansi
  .UNINDENT
- 
  .SS confdir
- The main Puppet configuration directory.  The default for this parameter is calculated based on the user.  If the process is runnig as root or the user that \fBpuppetmasterd\fP is supposed to run as, it defaults to a system directory, but if it\'s running as any other user, it defaults to being in \fB~\fP.
- 
+ .sp
+ The main Puppet configuration directory.  The default for this parameter is calculated based on the user.  If the process is runnig as root or the user that \fBpuppetmasterd\fP is supposed to run as, it defaults to a system directory, but if it\(aqs running as any other user, it defaults to being in \fB~\fP.
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: /etc/puppet
- 
+ .
+ \fBDefault\fP: /etc/puppet
  .UNINDENT
- 
  .SS config
+ .sp
  The configuration file for puppetdoc.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $confdir/puppet.conf
- 
+ .
+ \fBDefault\fP: $confdir/puppet.conf
  .UNINDENT
- 
  .SS config_version
+ .sp
  How to determine the configuration version.  By default, it will be the time that the configuration is parsed, but you can provide a shell script to override how the version is determined.  The output of this script will be added to every log message in the reports, allowing you to correlate changes on your hosts to the source version on the server.
- 
- 
  .SS configprint
- Print the value of a specific configuration parameter.  If a parameter is provided for this, then the value is printed and puppet exits.  Comma\-separate multiple values.  For a list of all values, specify \'all\'.  This feature is only available in Puppet versions higher than 0.18.4.
- 
- 
+ .sp
+ Print the value of a specific configuration parameter.  If a parameter is provided for this, then the value is printed and puppet exits.  Comma\-separate multiple values.  For a list of all values, specify \(aqall\(aq.  This feature is only available in Puppet versions higher than 0.18.4.
  .SS configtimeout
+ .sp
  How long the client should wait for the configuration to be retrieved before considering it a failure.  This can help reduce flapping if too many clients contact the server at one time.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: 120
- 
+ .
+ \fBDefault\fP: 120
  .UNINDENT
- 
  .SS csrdir
+ .sp
  Where the CA stores certificate requests
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $cadir/requests
- 
+ .
+ \fBDefault\fP: $cadir/requests
  .UNINDENT
- 
  .SS daemonize
+ .sp
  Send the process into the background.  This is the default.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: true
- 
+ .
+ \fBDefault\fP: true
  .UNINDENT
- 
  .SS dbadapter
+ .sp
  The type of database to use.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: sqlite3
- 
+ .
+ \fBDefault\fP: sqlite3
  .UNINDENT
 +
 +.SS dbconnections
 +The number of database connections. Only used when networked databases are used.  Will be ignored if the value is an empty string or is less than 1.
 +
 +
  .SS dblocation
+ .sp
  The database cache for client configurations.  Used for querying within the language.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $statedir/clientconfigs.sqlite3
- 
+ .
+ \fBDefault\fP: $statedir/clientconfigs.sqlite3
  .UNINDENT
- 
  .SS dbmigrate
+ .sp
  Whether to automatically migrate the database.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS dbname
+ .sp
  The name of the database to use.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: puppet
- 
+ .
+ \fBDefault\fP: puppet
  .UNINDENT
- 
  .SS dbpassword
+ .sp
  The database password for Client caching. Only used when networked databases are used.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: puppet
- 
+ .
+ \fBDefault\fP: puppet
  .UNINDENT
- 
  .SS dbserver
+ .sp
  The database server for Client caching. Only used when networked databases are used.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: localhost
- 
+ .
+ \fBDefault\fP: localhost
  .UNINDENT
- 
  .SS dbsocket
+ .sp
  The database socket location. Only used when networked databases are used.  Will be ignored if the value is an empty string.
- 
- 
  .SS dbuser
+ .sp
  The database user for Client caching. Only used when networked databases are used.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: puppet
- 
+ .
+ \fBDefault\fP: puppet
  .UNINDENT
- 
  .SS diff
+ .sp
  Which diff command to use when printing differences between files.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: diff
- 
+ .
+ \fBDefault\fP: diff
  .UNINDENT
- 
  .SS diff_args
+ .sp
  Which arguments to pass to the diff command when printing differences between files.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: \-u
- 
+ .
+ \fBDefault\fP: \-u
  .UNINDENT
- 
  .SS downcasefacts
+ .sp
  Whether facts should be made all lowercase when sent to the server.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS dynamicfacts
+ .sp
  Facts that are dynamic; these facts will be ignored when deciding whether changed facts should result in a recompile.  Multiple facts should be comma\-separated.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: memorysize,memoryfree,swapsize,swapfree
- 
+ .
+ \fBDefault\fP: memorysize,memoryfree,swapsize,swapfree
  .UNINDENT
- 
  .SS environment
+ .sp
  The environment Puppet is running in.  For clients (e.g., \fBpuppetd\fP) this determines the environment itself, which is used to find modules and much more.  For servers (i.e., \fBpuppetmasterd\fP) this provides the default environment for nodes we know nothing about.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: production
- 
+ .
+ \fBDefault\fP: production
  .UNINDENT
- 
  .SS evaltrace
+ .sp
  Whether each resource should log when it is being evaluated.  This allows you to interactively see exactly what is being done.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS external_nodes
+ .sp
  An external command that can produce node information.  The output must be a YAML dump of a hash, and that hash must have one or both of \fBclasses\fP and \fBparameters\fP, where \fBclasses\fP is an array and \fBparameters\fP is a hash.  For unknown nodes, the commands should exit with a non\-zero exit code. This command makes it straightforward to store your node mapping information in other data sources like databases.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: none
- 
+ .
+ \fBDefault\fP: none
  .UNINDENT
- 
  .SS factdest
+ .sp
  Where Puppet should store facts that it pulls down from the central server.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $vardir/facts/
- 
+ .
+ \fBDefault\fP: $vardir/facts/
  .UNINDENT
- 
  .SS factpath
+ .sp
  Where Puppet should look for facts.  Multiple directories should be colon\-separated, like normal PATH variables.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $vardir/facts/
- 
+ .
+ \fBDefault\fP: $vardir/facts/
  .UNINDENT
- 
  .SS factsignore
+ .sp
  What files to ignore when pulling down facts.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: .svn CVS
- 
+ .
+ \fBDefault\fP: .svn CVS
  .UNINDENT
- 
  .SS factsource
+ .sp
  From where to retrieve facts.  The standard Puppet \fBfile\fP type is used for retrieval, so anything that is a valid file source can be used here.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: puppet://$server/facts/
- 
+ .
+ \fBDefault\fP: puppet://$server/facts/
  .UNINDENT
- 
  .SS factsync
+ .sp
  Whether facts should be synced with the central server.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS fileserverconfig
+ .sp
  Where the fileserver configuration is stored.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $confdir/fileserver.conf
- 
+ .
+ \fBDefault\fP: $confdir/fileserver.conf
  .UNINDENT
- 
  .SS filetimeout
+ .sp
  The minimum time to wait (in seconds) between checking for updates in configuration files.  This timeout determines how quickly Puppet checks whether a file (such as manifests or templates) has changed on disk.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: 15
- 
+ .
+ \fBDefault\fP: 15
  .UNINDENT
- 
  .SS genconfig
+ .sp
  Whether to just print a configuration to stdout and exit.  Only makes sense when used interactively.  Takes into account arguments specified on the CLI.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS genmanifest
+ .sp
  Whether to just print a manifest to stdout and exit.  Only makes sense when used interactively.  Takes into account arguments specified on the CLI.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS graph
+ .sp
  Whether to create dot graph files for the different configuration graphs.  These dot files can be interpreted by tools like OmniGraffle or dot (which is part of ImageMagick).
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS graphdir
+ .sp
  Where to store dot\-outputted graphs.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $statedir/graphs
- 
+ .
+ \fBDefault\fP: $statedir/graphs
  .UNINDENT
- 
  .SS group
+ .sp
  The group puppetmasterd should run as.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: puppet
- 
+ .
+ \fBDefault\fP: puppet
  .UNINDENT
- 
  .SS hostcert
+ .sp
  Where individual hosts store and look for their certificates.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $certdir/$certname.pem
- 
+ .
+ \fBDefault\fP: $certdir/$certname.pem
  .UNINDENT
- 
  .SS hostcrl
- Where the host\'s certificate revocation list can be found. This is distinct from the certificate authority\'s CRL.
- 
+ .sp
+ Where the host\(aqs certificate revocation list can be found. This is distinct from the certificate authority\(aqs CRL.
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $ssldir/crl.pem
- 
+ .
+ \fBDefault\fP: $ssldir/crl.pem
  .UNINDENT
- 
  .SS hostcsr
+ .sp
  Where individual hosts store and look for their certificate requests.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $ssldir/csr_$certname.pem
- 
+ .
+ \fBDefault\fP: $ssldir/csr_$certname.pem
  .UNINDENT
- 
  .SS hostprivkey
+ .sp
  Where individual hosts store and look for their private key.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $privatekeydir/$certname.pem
- 
+ .
+ \fBDefault\fP: $privatekeydir/$certname.pem
  .UNINDENT
- 
  .SS hostpubkey
+ .sp
  Where individual hosts store and look for their public key.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $publickeydir/$certname.pem
- 
+ .
+ \fBDefault\fP: $publickeydir/$certname.pem
  .UNINDENT
- 
- .SS http_enable_post_connection_check
- Boolean; wheter or not puppetd should validate the server SSL certificate against the request hostname.
- 
- .INDENT 0.0
- 
- .IP \(bu 2
- \fPDefault\fP: true
- 
- .UNINDENT
- 
  .SS http_proxy_host
+ .sp
  The HTTP proxy host to use for outgoing connections.  Note: You may need to use a FQDN for the server hostname when using a proxy.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: none
- 
+ .
+ \fBDefault\fP: none
  .UNINDENT
- 
  .SS http_proxy_port
+ .sp
  The HTTP proxy port to use for outgoing connections
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: 3128
- 
+ .
+ \fBDefault\fP: 3128
  .UNINDENT
- 
  .SS httplog
+ .sp
  Where the puppetd web server logs.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $logdir/http.log
- 
+ .
+ \fBDefault\fP: $logdir/http.log
  .UNINDENT
- 
  .SS ignorecache
+ .sp
  Ignore cache and always recompile the configuration.  This is useful for testing new configurations, where the local cache may in fact be stale even if the timestamps are up to date \- if the facts change or if the server changes.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS ignoreimport
+ .sp
  A parameter that can be used in commit hooks, since it enables you to parse\-check a single file rather than requiring that all files exist.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS ignoreschedules
+ .sp
  Boolean; whether puppetd should ignore schedules.  This is useful for initial puppetd runs.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS keylength
+ .sp
  The bit length of keys.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: 1024
- 
+ .
+ \fBDefault\fP: 1024
  .UNINDENT
- 
  .SS ldapattrs
- The LDAP attributes to include when querying LDAP for nodes.  All returned attributes are set as variables in the top\-level scope. Multiple values should be comma\-separated.  The value \'all\' returns all attributes.
- 
+ .sp
+ The LDAP attributes to include when querying LDAP for nodes.  All returned attributes are set as variables in the top\-level scope. Multiple values should be comma\-separated.  The value \(aqall\(aq returns all attributes.
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: all
- 
+ .
+ \fBDefault\fP: all
  .UNINDENT
- 
  .SS ldapbase
- The search base for LDAP searches.  It\'s impossible to provide a meaningful default here, although the LDAP libraries might have one already set.  Generally, it should be the \'ou=Hosts\' branch under your main directory.
- 
- 
+ .sp
+ The search base for LDAP searches.  It\(aqs impossible to provide a meaningful default here, although the LDAP libraries might have one already set.  Generally, it should be the \(aqou=Hosts\(aq branch under your main directory.
  .SS ldapclassattrs
+ .sp
  The LDAP attributes to use to define Puppet classes.  Values should be comma\-separated.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: puppetclass
- 
+ .
+ \fBDefault\fP: puppetclass
  .UNINDENT
- 
  .SS ldapnodes
+ .sp
  Whether to search for node configurations in LDAP.  See \fI\%http://reductivelabs.com/trac/puppet/wiki/LDAPNodes\fP for more information.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS ldapparentattr
+ .sp
  The attribute to use to define the parent node.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: parentnode
- 
+ .
+ \fBDefault\fP: parentnode
  .UNINDENT
- 
  .SS ldappassword
+ .sp
  The password to use to connect to LDAP.
- 
- 
  .SS ldapport
+ .sp
  The LDAP port.  Only used if \fBldapnodes\fP is enabled.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: 389
- 
+ .
+ \fBDefault\fP: 389
  .UNINDENT
- 
  .SS ldapserver
+ .sp
  The LDAP server.  Only used if \fBldapnodes\fP is enabled.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: ldap
- 
+ .
+ \fBDefault\fP: ldap
  .UNINDENT
- 
  .SS ldapssl
+ .sp
  Whether SSL should be used when searching for nodes. Defaults to false because SSL usually requires certificates to be set up on the client side.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS ldapstackedattrs
+ .sp
  The LDAP attributes that should be stacked to arrays by adding the values in all hierarchy elements of the tree.  Values should be comma\-separated.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: puppetvar
- 
+ .
+ \fBDefault\fP: puppetvar
  .UNINDENT
- 
  .SS ldapstring
+ .sp
  The search string used to find an LDAP node.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: (&(objectclass=puppetClient)(cn=%s))
- 
+ .
+ \fBDefault\fP: (&(objectclass=puppetClient)(cn=%s))
  .UNINDENT
- 
  .SS ldaptls
+ .sp
  Whether TLS should be used when searching for nodes. Defaults to false because TLS usually requires certificates to be set up on the client side.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS ldapuser
+ .sp
  The user to use to connect to LDAP.  Must be specified as a full DN.
- 
- 
  .SS lexical
+ .sp
  Whether to use lexical scoping (vs. dynamic).
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS libdir
- An extra search path for Puppet.  This is only useful for those files that Puppet will load on demand, and is only guaranteed to work for those cases.  In fact, the autoload mechanism is responsible for making sure this directory is in Ruby\'s search path
- 
+ .sp
+ An extra search path for Puppet.  This is only useful for those files that Puppet will load on demand, and is only guaranteed to work for those cases.  In fact, the autoload mechanism is responsible for making sure this directory is in Ruby\(aqs search path
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $vardir/lib
- 
+ .
+ \fBDefault\fP: $vardir/lib
  .UNINDENT
- 
  .SS listen
+ .sp
  Whether puppetd should listen for connections.  If this is true, then by default only the \fBrunner\fP server is started, which allows remote authorized and authenticated nodes to connect and trigger \fBpuppetd\fP runs.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS localcacert
+ .sp
  Where each client stores the CA certificate.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $certdir/ca.pem
- 
+ .
+ \fBDefault\fP: $certdir/ca.pem
  .UNINDENT
- 
  .SS localconfig
+ .sp
  Where puppetd caches the local configuration.  An extension indicating the cache format is added automatically.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $statedir/localconfig
- 
+ .
+ \fBDefault\fP: $statedir/localconfig
  .UNINDENT
- 
  .SS logdir
+ .sp
  The Puppet log directory.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $vardir/log
- 
+ .
+ \fBDefault\fP: $vardir/log
  .UNINDENT
- 
  .SS manage_internal_file_permissions
+ .sp
  Whether Puppet should manage the owner, group, and mode of files  it uses internally
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: true
- 
+ .
+ \fBDefault\fP: true
  .UNINDENT
- 
  .SS manifest
+ .sp
  The entry\-point manifest for puppetmasterd.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $manifestdir/site.pp
- 
+ .
+ \fBDefault\fP: $manifestdir/site.pp
  .UNINDENT
- 
  .SS manifestdir
+ .sp
  Where puppetmasterd looks for its manifests.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $confdir/manifests
- 
+ .
+ \fBDefault\fP: $confdir/manifests
  .UNINDENT
- 
  .SS masterhttplog
+ .sp
  Where the puppetmasterd web server logs.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $logdir/masterhttp.log
- 
+ .
+ \fBDefault\fP: $logdir/masterhttp.log
  .UNINDENT
- 
  .SS masterlog
+ .sp
  Where puppetmasterd logs.  This is generally not used, since syslog is the default log destination.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $logdir/puppetmaster.log
- 
+ .
+ \fBDefault\fP: $logdir/puppetmaster.log
  .UNINDENT
- 
  .SS masterport
+ .sp
  Which port puppetmasterd listens on.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: 8140
- 
+ .
+ \fBDefault\fP: 8140
  .UNINDENT
- 
  .SS maximum_uid
+ .sp
  The maximum allowed UID.  Some platforms use negative UIDs but then ship with tools that do not know how to handle signed ints, so the UIDs show up as huge numbers that can then not be fed back into the system.  This is a hackish way to fail in a slightly more useful way when that happens.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: 4294967290
- 
+ .
+ \fBDefault\fP: 4294967290
  .UNINDENT
- 
  .SS mkusers
+ .sp
  Whether to create the necessary user and group that puppetd will run as.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS modulepath
+ .sp
  The search path for modules as a colon\-separated list of directories.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $confdir/modules:/usr/share/puppet/modules
- 
+ .
+ \fBDefault\fP: $confdir/modules:/usr/share/puppet/modules
  .UNINDENT
- 
  .SS name
+ .sp
  The name of the service, if we are running as one.  The default is essentially $0 without the path or \fB.rb\fP.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: puppetdoc
- 
+ .
+ \fBDefault\fP: puppetdoc
  .UNINDENT
- 
  .SS node_name
- How the puppetmaster determines the client\'s identity and sets the \'hostname\', \'fqdn\' and \'domain\' facts for use in the manifest, in particular for determining which \'node\' statement applies to the client. Possible values are \'cert\' (use the subject\'s CN in the client\'s certificate) and \'facter\' (use the hostname that the client reported in its facts)
- 
+ .sp
+ How the puppetmaster determines the client\(aqs identity and sets the \(aqhostname\(aq, \(aqfqdn\(aq and \(aqdomain\(aq facts for use in the manifest, in particular for determining which \(aqnode\(aq statement applies to the client. Possible values are \(aqcert\(aq (use the subject\(aqs CN in the client\(aqs certificate) and \(aqfacter\(aq (use the hostname that the client reported in its facts)
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: cert
- 
+ .
+ \fBDefault\fP: cert
  .UNINDENT
- 
  .SS node_terminus
+ .sp
  Where to find information about nodes.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: plain
- 
+ .
+ \fBDefault\fP: plain
  .UNINDENT
- 
  .SS noop
+ .sp
  Whether puppetd should be run in noop mode.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS paramcheck
+ .sp
  Whether to validate parameters during parsing.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: true
- 
+ .
+ \fBDefault\fP: true
  .UNINDENT
- 
  .SS parseonly
+ .sp
  Just check the syntax of the manifests.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS passfile
+ .sp
  Where puppetd stores the password for its private key. Generally unused.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $privatedir/password
- 
+ .
+ \fBDefault\fP: $privatedir/password
  .UNINDENT
- 
  .SS path
+ .sp
  The shell search path.  Defaults to whatever is inherited from the parent process.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: none
- 
+ .
+ \fBDefault\fP: none
  .UNINDENT
- 
  .SS pidfile
+ .sp
  The pid file
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $rundir/$name.pid
- 
+ .
+ \fBDefault\fP: $rundir/$name.pid
  .UNINDENT
- 
  .SS plugindest
+ .sp
  Where Puppet should store plugins that it pulls down from the central server.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $libdir
- 
+ .
+ \fBDefault\fP: $libdir
  .UNINDENT
- 
  .SS pluginsignore
+ .sp
  What files to ignore when pulling down plugins.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: .svn CVS .git
- 
+ .
+ \fBDefault\fP: .svn CVS .git
  .UNINDENT
- 
  .SS pluginsource
+ .sp
  From where to retrieve plugins.  The standard Puppet \fBfile\fP type is used for retrieval, so anything that is a valid file source can be used here.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: puppet://$server/plugins
- 
+ .
+ \fBDefault\fP: puppet://$server/plugins
  .UNINDENT
- 
  .SS pluginsync
+ .sp
  Whether plugins should be synced with the central server.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
+ .SS postrun_command
+ .sp
+ A command to run after every agent run.  If this command returns a non\-zero return code, the entire Puppet run will be considered to have failed, even though it might have performed work during the normal run.
  .SS preferred_serialization_format
- The preferred means of serializing ruby instances for passing over the wire.  This won\'t guarantee that all instances will be serialized using this method, since not all classes can be guaranteed to support this format, but it will be used for all classes that support it.
- 
+ .sp
+ The preferred means of serializing ruby instances for passing over the wire.  This won\(aqt guarantee that all instances will be serialized using this method, since not all classes can be guaranteed to support this format, but it will be used for all classes that support it.
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: pson
- 
+ .
+ \fBDefault\fP: pson
  .UNINDENT
- 
+ .SS prerun_command
+ .sp
+ A command to run before every agent run.  If this command returns a non\-zero return code, the entire Puppet run will fail.
  .SS privatedir
+ .sp
  Where the client stores private certificate information.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $ssldir/private
- 
+ .
+ \fBDefault\fP: $ssldir/private
  .UNINDENT
- 
  .SS privatekeydir
+ .sp
  The private key directory.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $ssldir/private_keys
- 
+ .
+ \fBDefault\fP: $ssldir/private_keys
  .UNINDENT
- 
  .SS publickeydir
+ .sp
  The public key directory.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $ssldir/public_keys
- 
+ .
+ \fBDefault\fP: $ssldir/public_keys
  .UNINDENT
- 
  .SS puppetdlockfile
+ .sp
  A lock file to temporarily stop puppetd from doing anything.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $statedir/puppetdlock
- 
+ .
+ \fBDefault\fP: $statedir/puppetdlock
  .UNINDENT
- 
  .SS puppetdlog
+ .sp
  The log file for puppetd.  This is generally not used.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $logdir/puppetd.log
- 
+ .
+ \fBDefault\fP: $logdir/puppetd.log
  .UNINDENT
- 
  .SS puppetport
+ .sp
  Which port puppetd listens on.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: 8139
- 
+ .
+ \fBDefault\fP: 8139
  .UNINDENT
- 
  .SS queue_source
+ .sp
  Which type of queue to use for asynchronous processing.  If your stomp server requires authentication, you can include it in the URI as long as your stomp client library is at least 1.1.1
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: stomp://localhost:61613/
- 
+ .
+ \fBDefault\fP: stomp://localhost:61613/
  .UNINDENT
- 
  .SS queue_type
+ .sp
  Which type of queue to use for asynchronous processing.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: stomp
- 
+ .
+ \fBDefault\fP: stomp
  .UNINDENT
- 
  .SS rails_loglevel
+ .sp
  The log level for Rails connections.  The value must be a valid log level within Rails.  Production environments normally use \fBinfo\fP and other environments normally use \fBdebug\fP.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: info
- 
+ .
+ \fBDefault\fP: info
  .UNINDENT
- 
  .SS railslog
+ .sp
  Where Rails\-specific logs are sent
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $logdir/rails.log
- 
+ .
+ \fBDefault\fP: $logdir/rails.log
  .UNINDENT
- 
  .SS report
+ .sp
  Whether to send reports after every transaction.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS report_port
+ .sp
  The port to communicate with the report_server.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $masterport
- 
+ .
+ \fBDefault\fP: $masterport
  .UNINDENT
- 
  .SS report_server
+ .sp
  The server to which to send transaction reports.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $server
- 
+ .
+ \fBDefault\fP: $server
  .UNINDENT
- 
  .SS reportdir
+ .sp
  The directory in which to store reports received from the client.  Each client gets a separate subdirectory.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $vardir/reports
- 
+ .
+ \fBDefault\fP: $vardir/reports
  .UNINDENT
- 
  .SS reportfrom
- The \'from\' email address for the reports.
- 
+ .sp
+ The \(aqfrom\(aq email address for the reports.
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: \fI\%report at pelin.lovedthanlost.net\fP
- 
+ .
+ \fBDefault\fP: \fI\%report at absinthe.lovedthanlost.net\fP
  .UNINDENT
- 
  .SS reports
+ .sp
  The list of reports to generate.  All reports are looked for in puppet/reports/<name>.rb, and multiple report names should be comma\-separated (whitespace is okay).
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: store
- 
+ .
+ \fBDefault\fP: store
  .UNINDENT
- 
  .SS reportserver
- (Deprecated for \'report_server\') The server to which to send transaction reports.
- 
+ .sp
+ (Deprecated for \(aqreport_server\(aq) The server to which to send transaction reports.
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $server
- 
+ .
+ \fBDefault\fP: $server
  .UNINDENT
- 
  .SS req_bits
+ .sp
  The bit length of the certificates.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: 2048
- 
+ .
+ \fBDefault\fP: 2048
  .UNINDENT
- 
  .SS requestdir
+ .sp
  Where host certificate requests are stored.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $ssldir/certificate_requests
- 
+ .
+ \fBDefault\fP: $ssldir/certificate_requests
  .UNINDENT
- 
  .SS rest_authconfig
+ .sp
  The configuration file that defines the rights to the different rest indirections.  This can be used as a fine\-grained authorization system for \fBpuppetmasterd\fP.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $confdir/auth.conf
- 
+ .
+ \fBDefault\fP: $confdir/auth.conf
  .UNINDENT
- 
  .SS rrddir
+ .sp
  The directory where RRD database files are stored. Directories for each reporting host will be created under this directory.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $vardir/rrd
- 
+ .
+ \fBDefault\fP: $vardir/rrd
  .UNINDENT
- 
  .SS rrdinterval
+ .sp
  How often RRD should expect data. This should match how often the hosts report back to the server.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $runinterval
- 
+ .
+ \fBDefault\fP: $runinterval
  .UNINDENT
- 
  .SS rundir
+ .sp
  Where Puppet PID files are kept.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $vardir/run
- 
+ .
+ \fBDefault\fP: $vardir/run
  .UNINDENT
- 
  .SS runinterval
+ .sp
  How often puppetd applies the client configuration; in seconds.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: 1800
- 
+ .
+ \fBDefault\fP: 1800
  .UNINDENT
- 
  .SS sendmail
+ .sp
  Where to find the sendmail binary with which to send email.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: /usr/sbin/sendmail
- 
+ .
+ \fBDefault\fP: /usr/sbin/sendmail
  .UNINDENT
- 
  .SS serial
+ .sp
  Where the serial number for certificates is stored.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $cadir/serial
- 
+ .
+ \fBDefault\fP: $cadir/serial
  .UNINDENT
- 
  .SS server
+ .sp
  The server to which server puppetd should connect
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: puppet
- 
+ .
+ \fBDefault\fP: puppet
  .UNINDENT
- 
  .SS servertype
+ .sp
  The type of server to use.  Currently supported options are webrick and mongrel.  If you use mongrel, you will need a proxy in front of the process or processes, since Mongrel cannot speak SSL.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: webrick
- 
+ .
+ \fBDefault\fP: webrick
  .UNINDENT
- 
  .SS show_diff
+ .sp
  Whether to print a contextual diff when files are being replaced.  The diff is printed on stdout, so this option is meaningless unless you are running Puppet interactively. This feature currently requires the \fBdiff/lcs\fP Ruby library.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS signeddir
+ .sp
  Where the CA stores signed certificates.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $cadir/signed
- 
+ .
+ \fBDefault\fP: $cadir/signed
  .UNINDENT
- 
  .SS smtpserver
+ .sp
  The server through which to send email reports.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: none
- 
+ .
+ \fBDefault\fP: none
  .UNINDENT
- 
  .SS splay
+ .sp
  Whether to sleep for a pseudo\-random (but consistent) amount of time before a run.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS splaylimit
+ .sp
  The maximum time to delay before runs.  Defaults to being the same as the run interval.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $runinterval
- 
+ .
+ \fBDefault\fP: $runinterval
  .UNINDENT
- 
  .SS ssl_client_header
- The header containing an authenticated client\'s SSL DN.  Only used with Mongrel.  This header must be set by the proxy to the authenticated client\'s SSL DN (e.g., \fB/CN=puppet.reductivelabs.com\fP). See \fI\%http://reductivelabs.com/puppet/trac/wiki/UsingMongrel\fP for more information.
- 
+ .sp
+ The header containing an authenticated client\(aqs SSL DN.  Only used with Mongrel.  This header must be set by the proxy to the authenticated client\(aqs SSL DN (e.g., \fB/CN=puppet.reductivelabs.com\fP). See \fI\%http://reductivelabs.com/puppet/trac/wiki/UsingMongrel\fP for more information.
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: HTTP_X_CLIENT_DN
- 
+ .
+ \fBDefault\fP: HTTP_X_CLIENT_DN
  .UNINDENT
- 
  .SS ssl_client_verify_header
- The header containing the status message of the client verification. Only used with Mongrel.  This header must be set by the proxy to \'SUCCESS\' if the client successfully authenticated, and anything else otherwise. See \fI\%http://reductivelabs.com/puppet/trac/wiki/UsingMongrel\fP for more information.
- 
+ .sp
+ The header containing the status message of the client verification. Only used with Mongrel.  This header must be set by the proxy to \(aqSUCCESS\(aq if the client successfully authenticated, and anything else otherwise. See \fI\%http://reductivelabs.com/puppet/trac/wiki/UsingMongrel\fP for more information.
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: HTTP_X_CLIENT_VERIFY
- 
+ .
+ \fBDefault\fP: HTTP_X_CLIENT_VERIFY
  .UNINDENT
- 
  .SS ssldir
+ .sp
  Where SSL certificates are kept.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $confdir/ssl
- 
+ .
+ \fBDefault\fP: $confdir/ssl
  .UNINDENT
- 
  .SS statedir
+ .sp
  The directory where Puppet state is stored.  Generally, this directory can be removed without causing harm (although it might result in spurious service restarts).
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $vardir/state
- 
+ .
+ \fBDefault\fP: $vardir/state
  .UNINDENT
- 
  .SS statefile
+ .sp
  Where puppetd and puppetmasterd store state associated with the running configuration.  In the case of puppetmasterd, this file reflects the state discovered through interacting with clients.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $statedir/state.yaml
- 
+ .
+ \fBDefault\fP: $statedir/state.yaml
  .UNINDENT
- 
  .SS storeconfigs
- Whether to store each client\'s configuration.  This requires ActiveRecord from Ruby on Rails.
- 
+ .sp
+ Whether to store each client\(aqs configuration.  This requires ActiveRecord from Ruby on Rails.
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS strict_hostname_checking
+ .sp
  Whether to only search for the complete hostname as it is in the certificate when searching for node information in the catalogs.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS summarize
+ .sp
  Whether to print a transaction summary.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS syslogfacility
+ .sp
  What syslog facility to use when logging to syslog.  Syslog has a fixed list of valid facilities, and you must choose one of those; you cannot just make one up.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: daemon
- 
+ .
+ \fBDefault\fP: daemon
  .UNINDENT
- 
  .SS tagmap
+ .sp
  The mapping between reporting tags and email addresses.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $confdir/tagmail.conf
- 
+ .
+ \fBDefault\fP: $confdir/tagmail.conf
  .UNINDENT
- 
  .SS tags
+ .sp
  Tags to use to find resources.  If this is set, then only resources tagged with the specified tags will be applied. Values must be comma\-separated.
- 
- 
  .SS templatedir
+ .sp
  Where Puppet looks for template files.  Can be a list of colon\-seperated directories.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $vardir/templates
- 
+ .
+ \fBDefault\fP: $vardir/templates
  .UNINDENT
- 
  .SS thin_storeconfigs
+ .sp
  Boolean; wether storeconfigs store in the database only the facts and exported resources. If true, then storeconfigs performance will be higher and still allow exported/collected resources, but other usage external to Puppet might not work
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS trace
+ .sp
  Whether to print stack traces on some errors
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: false
- 
+ .
+ \fBDefault\fP: false
  .UNINDENT
- 
  .SS typecheck
+ .sp
  Whether to validate types during parsing.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: true
- 
+ .
+ \fBDefault\fP: true
  .UNINDENT
- 
  .SS usecacheonfailure
+ .sp
  Whether to use the cached configuration when the remote configuration will not compile.  This option is useful for testing new configurations, where you want to fix the broken configuration rather than reverting to a known\-good one.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: true
- 
+ .
+ \fBDefault\fP: true
  .UNINDENT
- 
  .SS user
+ .sp
  The user puppetmasterd should run as.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: puppet
- 
+ .
+ \fBDefault\fP: puppet
  .UNINDENT
- 
  .SS vardir
+ .sp
  Where Puppet stores dynamic and growing data.  The default for this parameter is calculated specially, like \fI\%confdir\fP.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: /var/puppet
- 
+ .
+ \fBDefault\fP: /var/puppet
  .UNINDENT
- 
  .SS yamldir
+ .sp
  The directory in which YAML data is stored, usually in a subdirectory.
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: $vardir/yaml
- 
+ .
+ \fBDefault\fP: $vardir/yaml
  .UNINDENT
- 
  .SS zlib
+ .sp
  Boolean; whether to use the zlib library
- 
  .INDENT 0.0
- 
  .IP \(bu 2
- \fPDefault\fP: true
- 
+ .
+ \fBDefault\fP: true
  .UNINDENT
  
  .sp
@@@ -1787,8 -1462,8 +1467,8 @@@
  
  .ce 0
  .sp
- \fIThis page autogenerated on Wed Dec 30 19:31:12 \-0500 2009\fP
- 
- 
- .\" Generated by docutils manpage writer on 2009-12-30 19:31.
+ .sp
+ \fIThis page autogenerated on Mon Feb 08 23:57:07 +1100 2010\fP
+ .\" Generated by docutils manpage writer.
  .\" 
+ .
diff --combined spec/integration/bin/puppetmasterd.rb
index 579a42d,f1d77ef..0952635
--- a/spec/integration/bin/puppetmasterd.rb
+++ b/spec/integration/bin/puppetmasterd.rb
@@@ -16,6 -16,10 +16,10 @@@ describe "puppetmasterd" d
          Puppet[:certdnsnames] = "localhost"
  
          @@port = 12345
+ 
+         Puppet::SSL::Host.instance_eval{
+             @value_cache = {}
+         }
      end
  
      after {
@@@ -48,7 -52,7 +52,7 @@@
              f.puts { "notify { testing: }" }
          end
  
-         args = arguments + addl_args
+         args = arguments + " " + addl_args
  
          bin = File.join(File.dirname(__FILE__), "..", "..", "..", "sbin", "puppetmasterd")
          lib = File.join(File.dirname(__FILE__), "..", "..", "..", "lib")
@@@ -56,9 -60,22 +60,22 @@@
      end
  
      def stop
-         if @pidfile and FileTest.exist?(@pidfile)
+         if @pidfile and File.exist?(@pidfile)
              pid = File.read(@pidfile).chomp.to_i
              Process.kill(:TERM, pid)
+             10.times do
+                 break unless File.exist?(@pidfile)
+                 sleep 1
+             end
+             begin
+                 # sigkill and report if process was still running
+                 Process.kill(:KILL, pid)
+ 
+                 raise "Process didn't die from SIGTERM after 10 seconds"
+             rescue Errno::ESRCH
+                 # process wasn't running. good.
+             end
+ 
          end
      end
  
@@@ -73,16 -90,10 +90,10 @@@
      it "should be serving status information over xmlrpc" do
          start
  
-         sleep 5
+         sleep 6
  
          client = Puppet::Network::Client.status.new(:Server => "localhost", :Port => @@port)
  
-         FileUtils.mkdir_p(File.dirname(Puppet[:autosign]))
-         File.open(Puppet[:autosign], "w") { |f|
-             f.puts Puppet[:certname]
-         }
- 
-         client.cert
          retval = client.status
  
          retval.should == 1
@@@ -108,27 -119,4 +119,27 @@@
      end
  
      it "should exit with return code 1 after parsing if --parseonly is set and there are errors"
 +
 +    describe "when run for the first time" do
 +        before do
 +            @ssldir = File.join(@dir, 'ssl')
 +            FileUtils.rm_r(@ssldir) if File.exists?(@ssldir)
 +        end
 +
 +        describe "with noop" do
 +            it "should create its ssl directory" do
 +                File.directory?(@ssldir).should be_false
 +                start(' --noop')
 +                File.directory?(@ssldir).should be_true
 +            end
 +        end
 +
 +        describe "without noop" do
 +            it "should create its ssl directory" do
 +                File.directory?(@ssldir).should be_false
 +                start
 +                File.directory?(@ssldir).should be_true
 +            end
 +        end
 +    end
  end
diff --combined spec/integration/defaults.rb
index 590be13,e97035d..1888813
--- a/spec/integration/defaults.rb
+++ b/spec/integration/defaults.rb
@@@ -215,9 -215,12 +215,17 @@@ describe "Puppet defaults" d
              Puppet.settings[:report_server].should == "report_server"
          end
      end
 +    
 +    it "should have a :caname setting that defaults to the cert name" do
 +        Puppet.settings[:certname] = "foo"
 +        Puppet.settings[:ca_name].should == "foo"
 +    end
+ 
+     it "should have a 'prerun_command' that defaults to the empty string" do
+         Puppet.settings[:prerun_command].should == ""
+     end
+ 
+     it "should have a 'postrun_command' that defaults to the empty string" do
+         Puppet.settings[:postrun_command].should == ""
+     end
  end
diff --combined spec/integration/indirector/certificate/rest.rb
index 9131ac0,a814e00..8042f86
--- a/spec/integration/indirector/certificate/rest.rb
+++ b/spec/integration/indirector/certificate/rest.rb
@@@ -19,7 -19,6 +19,6 @@@ describe "Certificate REST Terminus" d
          Puppet.settings[:vardir] = @dir
          Puppet.settings[:server] = "127.0.0.1"
          Puppet.settings[:masterport] = "34343"
-         Puppet.settings[:http_enable_post_connection_check] = false
  
          Puppet::Util::Cacher.expire
  
@@@ -64,6 -63,8 +63,6 @@@
  
          # There's no good '==' method on certs.
          result.content.to_s.should == @host.certificate.content.to_s
 -
 -        # also make sure it uses the provided name, rather than the internal one.
          result.name.should == "bar"
      end
  end
diff --combined spec/integration/indirector/certificate_revocation_list/rest.rb
index 1295dd2,5c68467..8c8d6e1
--- a/spec/integration/indirector/certificate_revocation_list/rest.rb
+++ b/spec/integration/indirector/certificate_revocation_list/rest.rb
@@@ -19,7 -19,6 +19,6 @@@ describe "Certificate REST Terminus" d
          Puppet.settings[:vardir] = @dir
          Puppet.settings[:server] = "127.0.0.1"
          Puppet.settings[:masterport] = "34343"
-         Puppet.settings[:http_enable_post_connection_check] = false
  
          Puppet::Util::Cacher.expire
  
@@@ -41,7 -40,7 +40,7 @@@
  
          # Now remove the cached crl
          Puppet::SSL::Host.ca_location = :none
 -        Puppet::SSL::CertificateRevocationList.destroy("ca")
 +        Puppet::SSL::CertificateRevocationList.destroy(Puppet::SSL::CA_NAME)
  
          # This is necessary so that we create the SSL store before we start
          # using REST.  This is necessary to prevent an infinite loop,
diff --combined spec/integration/indirector/rest.rb
index 287387e,f4561c6..57ace85
--- a/spec/integration/indirector/rest.rb
+++ b/spec/integration/indirector/rest.rb
@@@ -11,7 -11,6 +11,7 @@@ class Puppet::TestIndirectedFo
      indirects :test_indirected_foo, :terminus_setting => :test_indirected_foo_terminus
  
      attr_reader :value
 +    attr_accessor :name
  
      def initialize(value = 0)
          @value = value
@@@ -41,7 -40,6 +41,6 @@@ describe Puppet::Indirector::REST d
          Puppet.settings[:vardir] = @dir
          Puppet.settings[:server] = "127.0.0.1"
          Puppet.settings[:masterport] = "34343"
-         Puppet.settings[:http_enable_post_connection_check] = false
  
          Puppet::SSL::Host.ca_location = :local
  
diff --combined spec/unit/application/puppet.rb
index be200bb,61dcf90..1539f04
--- a/spec/unit/application/puppet.rb
+++ b/spec/unit/application/puppet.rb
@@@ -173,6 -173,9 +173,9 @@@ describe "Puppet" d
          describe "the main command" do
              before :each do
                  Puppet.stubs(:[])
+                 Puppet.settings.stubs(:use)
+                 Puppet.stubs(:[]).with(:prerun_command).returns ""
+                 Puppet.stubs(:[]).with(:postrun_command).returns ""
                  Puppet.stubs(:[]).with(:trace).returns(true)
  
                  @puppet.options.stubs(:[])
@@@ -277,43 -280,68 +280,53 @@@
                  @puppet.main
              end
  
+             it "should call the prerun and postrun commands on a Configurer instance" do
+                 configurer = stub 'configurer'
+ 
+                 Puppet::Configurer.expects(:new).returns configurer
+                 configurer.expects(:execute_prerun_command)
+                 configurer.expects(:execute_postrun_command)
+ 
+                 @puppet.main
+             end
+ 
              it "should apply the catalog" do
                  @catalog.expects(:apply)
  
                  @puppet.main
              end
  
 -            it "should generate a report if not noop" do
 -                Puppet.stubs(:[]).with(:noop).returns(false)
 -                @puppet.options.stubs(:[]).with(:detailed_exitcodes).returns(true)
 -                metrics = stub 'metrics', :[] => { :total => 10, :failed => 0}
 -                report = stub 'report', :metrics => metrics
 -                @transaction.stubs(:report).returns(report)
 -
 -                @transaction.expects(:generate_report)
 -
 -                @puppet.main
 -            end
 -
              describe "with detailed_exitcodes" do
 -                before :each do
 +                it "should exit with report's computed exit status" do
                      Puppet.stubs(:[]).with(:noop).returns(false)
                      @puppet.options.stubs(:[]).with(:detailed_exitcodes).returns(true)
 -                end
 -
 -                it "should exit with exit code of 2 if changes" do
 -                    report = stub 'report', :metrics => { "changes" => {:total => 1}, "resources" => {:failed => 0} }
 -                    @transaction.stubs(:generate_report).returns(report)
 +                    report = stub 'report', :exit_status => 666
                      @transaction.stubs(:report).returns(report)
 -                    @puppet.expects(:exit).with(2)
 +                    @puppet.expects(:exit).with(666)
  
                      @puppet.main
                  end
  
 -                it "should exit with exit code of 4 if failures" do
 -                    report = stub 'report', :metrics => { "changes" => {:total => 0}, "resources" => {:failed => 1} }
 -                    @transaction.stubs(:generate_report).returns(report)
 +                it "should always exit with 0 if option is disabled" do
 +                    Puppet.stubs(:[]).with(:noop).returns(false)
 +                    @puppet.options.stubs(:[]).with(:detailed_exitcodes).returns(false)
 +                    report = stub 'report', :exit_status => 666
                      @transaction.stubs(:report).returns(report)
 -                    @puppet.expects(:exit).with(4)
 +                    @puppet.expects(:exit).with(0)
  
                      @puppet.main
                  end
  
 -                it "should exit with exit code of 6 if changes and failures" do
 -                    report = stub 'report', :metrics => { "changes" => {:total => 1}, "resources" => {:failed => 1} }
 -                    @transaction.stubs(:generate_report).returns(report)
 +                it "should always exit with 0 if --noop" do
 +                    Puppet.stubs(:[]).with(:noop).returns(true)
 +                    @puppet.options.stubs(:[]).with(:detailed_exitcodes).returns(true)
 +                    report = stub 'report', :exit_status => 666
                      @transaction.stubs(:report).returns(report)
 -                    @puppet.expects(:exit).with(6)
 +                    @puppet.expects(:exit).with(0)
  
                      @puppet.main
                  end
              end
 -
          end
  
          describe "the 'apply' command" do
diff --combined spec/unit/configurer.rb
index 8a3577c,32c0772..03ef188
--- a/spec/unit/configurer.rb
+++ b/spec/unit/configurer.rb
@@@ -7,6 -7,11 +7,11 @@@ require File.dirname(__FILE__) + '/../s
  require 'puppet/configurer'
  
  describe Puppet::Configurer do
+     before do
+         Puppet.settings.stubs(:use).returns(true)
+         @agent = Puppet::Configurer.new
+     end
+ 
      it "should include the Plugin Handler module" do
          Puppet::Configurer.ancestors.should be_include(Puppet::Configurer::PluginHandler)
      end
@@@ -19,25 -24,60 +24,71 @@@
          Puppet.settings.expects(:value).with(:puppetdlockfile).returns("/my/lock")
          Puppet::Configurer.lockfile_path.should == "/my/lock"
      end
+ 
+     describe "when executing a pre-run hook" do
+         it "should do nothing if the hook is set to an empty string" do
+             Puppet.settings[:prerun_command] = ""
+             Puppet::Util.expects(:exec).never
+ 
+             @agent.execute_prerun_command
+         end
+ 
+         it "should execute any pre-run command provided via the 'prerun_command' setting" do
+             Puppet.settings[:prerun_command] = "/my/command"
+             Puppet::Util.expects(:execute).with { |args| args[0] == "/my/command" }
+ 
+             @agent.execute_prerun_command
+         end
+ 
+         it "should fail if the command fails" do
+             Puppet.settings[:prerun_command] = "/my/command"
+             Puppet::Util.expects(:execute).raises Puppet::ExecutionFailure
+ 
+             lambda { @agent.execute_prerun_command }.should raise_error(Puppet::Configurer::CommandHookError)
+         end
+     end
+ 
+     describe "when executing a post-run hook" do
+         it "should do nothing if the hook is set to an empty string" do
+             Puppet.settings[:postrun_command] = ""
+             Puppet::Util.expects(:exec).never
+ 
+             @agent.execute_postrun_command
+         end
+ 
+         it "should execute any post-run command provided via the 'postrun_command' setting" do
+             Puppet.settings[:postrun_command] = "/my/command"
+             Puppet::Util.expects(:execute).with { |args| args[0] == "/my/command" }
+ 
+             @agent.execute_postrun_command
+         end
+ 
+         it "should fail if the command fails" do
+             Puppet.settings[:postrun_command] = "/my/command"
+             Puppet::Util.expects(:execute).raises Puppet::ExecutionFailure
+ 
+             lambda { @agent.execute_postrun_command }.should raise_error(Puppet::Configurer::CommandHookError)
+         end
+     end
  end
  
 +describe Puppet::Configurer, "when initializing a report" do
 +    it "should return an instance of a transaction report" do
 +        Puppet.settings.stubs(:use).returns(true)
 +        @agent = Puppet::Configurer.new
 +        @agent.initialize_report.should be_instance_of(Puppet::Transaction::Report)
 +    end
 +end
 +
  describe Puppet::Configurer, "when executing a catalog run" do
      before do
          Puppet.settings.stubs(:use).returns(true)
          @agent = Puppet::Configurer.new
          @agent.stubs(:facts_for_uploading).returns({})
          @agent.stubs(:retrieve_catalog).returns Puppet::Resource::Catalog.new
 +
 +        Puppet::Util::Log.stubs(:newdestination)
 +        Puppet::Util::Log.stubs(:close)
      end
  
      it "should prepare for the run" do
@@@ -46,22 -86,6 +97,22 @@@
          @agent.run
      end
  
 +    it "should initialize a transaction report" do
 +        report = stub 'report'
 +        @agent.expects(:initialize_report).returns report
 +
 +        @agent.run
 +    end
 +
 +    it "should set the report as a log destination" do
 +        report = stub 'report'
 +        @agent.expects(:initialize_report).returns report
 +
 +        Puppet::Util::Log.expects(:newdestination).with(report)
 +
 +        @agent.run
 +    end
 +
      it "should retrieve the catalog" do
          @agent.expects(:retrieve_catalog)
  
@@@ -80,7 -104,7 +131,7 @@@
          catalog = stub 'catalog', :retrieval_duration= => nil
          @agent.expects(:retrieve_catalog).returns catalog
  
 -        catalog.expects(:apply).with(:one => true)
 +        catalog.expects(:apply).with { |args| args[:one] == true }
          @agent.run :one => true
      end
  
@@@ -88,7 -112,7 +139,7 @@@
          catalog = stub 'catalog', :retrieval_duration= => nil
          @agent.expects(:retrieve_catalog).never
  
 -        catalog.expects(:apply).with(:one => true)
 +        catalog.expects(:apply)
          @agent.run :one => true, :catalog => catalog
      end
  
@@@ -102,125 -126,11 +153,131 @@@
          @agent.run
      end
  
+     it "should execute post-run hooks after the run" do
+         @agent.expects(:execute_postrun_command)
+ 
+         @agent.run
+     end
++
 +    it "should send the report" do
 +        report = stub 'report'
 +        @agent.expects(:initialize_report).returns report
 +        @agent.expects(:send_report).with { |r, trans| r == report }
 +
 +        @agent.run
 +    end
 +
 +    it "should send the transaction report with a reference to the transaction if a run was actually made" do
 +        report = stub 'report'
 +        @agent.expects(:initialize_report).returns report
 +
 +        catalog = stub 'catalog', :retrieval_duration= => nil
 +
 +        trans = stub 'transaction'
 +        catalog.expects(:apply).returns trans
 +
 +        @agent.expects(:send_report).with { |r, t| t == trans }
 +
 +        @agent.run :catalog => catalog
 +    end
 +
 +    it "should send the transaction report even if the catalog could not be retrieved" do
 +        @agent.expects(:retrieve_catalog).returns nil
 +
 +        report = stub 'report'
 +        @agent.expects(:initialize_report).returns report
 +        @agent.expects(:send_report)
 +
 +        @agent.run
 +    end
 +
 +    it "should send the transaction report even if there is a failure" do
 +        @agent.expects(:retrieve_catalog).raises "whatever"
 +
 +        report = stub 'report'
 +        @agent.expects(:initialize_report).returns report
 +        @agent.expects(:send_report)
 +
 +        lambda { @agent.run }.should raise_error
 +    end
 +
 +    it "should remove the report as a log destination when the run is finished" do
 +        report = stub 'report'
 +        @agent.expects(:initialize_report).returns report
 +
 +        Puppet::Util::Log.expects(:close).with(report)
 +
 +        @agent.run
 +    end
 +
 +    it "should return the report as the result of the run" do
 +        report = stub 'report'
 +        @agent.expects(:initialize_report).returns report
 +
 +        @agent.run.should equal(report)
 +    end
 +end
 +
 +describe Puppet::Configurer, "when sending a report" do
 +    before do
 +        Puppet.settings.stubs(:use).returns(true)
 +        @configurer = Puppet::Configurer.new
 +
 +        @report = stub 'report'
 +        @trans = stub 'transaction'
 +    end
 +
 +    it "should require a report" do
 +        lambda { @configurer.send_report }.should raise_error(ArgumentError)
 +    end
 +
 +    it "should allow specification of a transaction" do
 +        lambda { @configurer.send_report(@report, @trans)  }.should_not raise_error(ArgumentError)
 +    end
 +
 +    it "should use any provided transaction to add metrics to the report" do
 +        @trans.expects(:add_metrics_to_report).with(@report)
 +        @configurer.send_report(@report, @trans)
 +    end
 +
 +    it "should print a report summary if configured to do so" do
 +        Puppet.settings[:summarize] = true
 +
 +        @report.expects(:summary).returns "stuff"
 +
 +        @configurer.expects(:puts).with("stuff")
 +        @configurer.send_report(@report)
 +    end
 +
 +    it "should not print a report summary if not configured to do so" do
 +        Puppet.settings[:summarize] = false
 +
 +        @configurer.expects(:puts).never
 +        @configurer.send_report(@report)
 +    end
 +
 +    it "should save the report if reporting is enabled" do
 +        Puppet.settings[:report] = true
 +
 +        @report.expects(:save)
 +        @configurer.send_report(@report)
 +    end
 +
 +    it "should not save the report if reporting is disabled" do
 +        Puppet.settings[:report] = false
 +
 +        @report.expects(:save).never
 +        @configurer.send_report(@report)
 +    end
 +
 +    it "should log but not fail if saving the report fails" do
 +        Puppet.settings[:report] = true
 +
 +        @report.expects(:save).raises "whatever"
 +
 +        Puppet.expects(:err)
 +        lambda { @configurer.send_report(@report) }.should_not raise_error
 +    end
  end
  
  describe Puppet::Configurer, "when retrieving a catalog" do
@@@ -360,6 -270,9 +417,9 @@@ describe Puppet::Configurer, "when prep
          Puppet.settings.stubs(:use).returns(true)
          @agent = Puppet::Configurer.new
          @agent.stubs(:dostorage)
+         @agent.stubs(:download_fact_plugins)
+         @agent.stubs(:download_plugins)
+         @agent.stubs(:execute_prerun_command)
          @facts = {"one" => "two", "three" => "four"}
      end
  
@@@ -370,16 -283,19 +430,19 @@@
      end
  
      it "should download fact plugins" do
-         @agent.stubs(:dostorage)
          @agent.expects(:download_fact_plugins)
  
          @agent.prepare
      end
  
      it "should download plugins" do
-         @agent.stubs(:dostorage)
          @agent.expects(:download_plugins)
  
          @agent.prepare
      end
+ 
+     it "should perform the pre-run commands" do
+         @agent.expects(:execute_prerun_command)
+         @agent.prepare
+     end
  end
diff --combined test/other/transactions.rb
index d0c6b85,57a3a1c..dd77427
--- a/test/other/transactions.rb
+++ b/test/other/transactions.rb
@@@ -2,9 -2,9 +2,9 @@@
  
  require File.dirname(__FILE__) + '/../lib/puppettest'
  
 +require 'mocha'
  require 'puppet'
  require 'puppettest'
 -require 'mocha'
  require 'puppettest/support/resources'
  require 'puppettest/support/utils'
  
@@@ -77,6 -77,48 +77,6 @@@ class TestTransactions < Test::Unit::Te
          return type
      end
  
 -    def test_reports
 -        path1 = tempfile()
 -        path2 = tempfile()
 -        objects = []
 -        objects << Puppet::Type.type(:file).new(
 -            :path => path1,
 -            :content => "yayness"
 -        )
 -        objects << Puppet::Type.type(:file).new(
 -            :path => path2,
 -            :content => "booness"
 -        )
 -
 -        trans = assert_events([:file_created, :file_created], *objects)
 -
 -        report = nil
 -
 -        assert_nothing_raised {
 -            report = trans.generate_report
 -        }
 -
 -        # First test the report logs
 -        assert(report.logs.length > 0, "Did not get any report logs")
 -
 -        report.logs.each do |obj|
 -            assert_instance_of(Puppet::Util::Log, obj)
 -        end
 -
 -        # Then test the metrics
 -        metrics = report.metrics
 -
 -        assert(metrics, "Did not get any metrics")
 -        assert(metrics.length > 0, "Did not get any metrics")
 -
 -        assert(metrics.has_key?("resources"), "Did not get object metrics")
 -        assert(metrics.has_key?("changes"), "Did not get change metrics")
 -
 -        metrics.each do |name, metric|
 -            assert_instance_of(Puppet::Util::Metric, metric)
 -        end
 -    end
 -
      def test_prefetch
          # Create a type just for testing prefetch
          name = :prefetchtesting
@@@ -326,7 -368,7 +326,7 @@@
  
          # 'subscribe' expects an array of arrays
          #component[:require] = [[file.class.name,file.name]]
-         ecomp[:subscribe] = fcomp
+         ecomp[:subscribe] = fcomp.ref
          exec[:refreshonly] = true
  
          trans = assert_events([], config)
@@@ -532,8 -574,7 +532,8 @@@
      end
  
      def test_missing_tags?
 -        resource = stub 'resource', :tagged? => true
 +        resource = Puppet::Type.type(:notify).new :title => "foo"
 +        resource.stubs(:tagged?).returns true
          config = Puppet::Resource::Catalog.new
  
          # Mark it as a host config so we don't care which test is first

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list