Please review pull request #379: (#8917) Add 'client' config option opened by (fpletz)

Description:

  • Opened: Sat Jan 21 22:27:43 UTC 2012
  • Based on: puppetlabs:master (5e98876f5c91e7019ef9ea0842e30bdcfe8098b2)
  • Requested merge: fpletz:fix-8917 (26424cd43f6b6923db52de86ef05edf3c3985ca7)

Diff follows:

diff --git a/lib/puppet/application/agent.rb b/lib/puppet/application/agent.rb
index 74eb222..8d584b9 100644
--- a/lib/puppet/application/agent.rb
+++ b/lib/puppet/application/agent.rb
@@ -402,7 +402,7 @@ def setup_host
   end
 
   def setup_agent
-    # We need tomake the client either way, we just don't start it
+    # We need to make the client either way, we just don't start it
     # if --no-client is set.
     require 'puppet/agent'
     require 'puppet/configurer'
@@ -410,7 +410,7 @@ def setup_agent
 
     enable_disable_client(@agent) if options[:enable] or options[:disable]
 
-    @daemon.agent = agent if options[:client]
+    @daemon.agent = agent if options[:client] and Puppet.settings[:client]
 
     # It'd be nice to daemonize later, but we have to daemonize before the
     # waitforcert happens.
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 57f9f42..b799d5f 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -626,6 +626,9 @@ module Puppet
       Note that a runinterval of 0 means \"run continuously\" rather than
       \"never run.\" If you want puppet agent to never run, you should start
       it with the `--no-client` option."],
+    :client => [true, "This will casue the daemon to run without ever checking for
+      its configuration automagically, and only makes sense when puppet agent is
+      being run with listen = true."],
     :listen => [false, "Whether puppet agent should listen for
       connections.  If this is true, then puppet agent will accept incoming
       REST API requests, subject to the default ACLs and the ACLs set in
diff --git a/man/man5/puppet.conf.5 b/man/man5/puppet.conf.5
index aa747bd..49ff778 100644
--- a/man/man5/puppet.conf.5
+++ b/man/man5/puppet.conf.5
@@ -257,6 +257,13 @@ The file in which puppet agent stores a list of the classes associated with the
 .
 .IP "" 0
 .
+.SS "client"
+This will cause the daemon to run without ever checking for its configuration automatically, and only makes sense when puppet agent is being run with listen = true\.
+.
+.IP "\(bu" 4
+\fIDefault\fR: true
+.
+.IP "" 0
 .SS "client_datadir"
 The directory in which serialized data is stored on the client\.
 .

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to