summaryrefslogtreecommitdiffstats
path: root/lib/puppet/reference/configuration.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/reference/configuration.rb')
-rw-r--r--lib/puppet/reference/configuration.rb94
1 files changed, 47 insertions, 47 deletions
diff --git a/lib/puppet/reference/configuration.rb b/lib/puppet/reference/configuration.rb
index 2f60ecc65..bfa2cb802 100644
--- a/lib/puppet/reference/configuration.rb
+++ b/lib/puppet/reference/configuration.rb
@@ -1,44 +1,44 @@
config = Puppet::Util::Reference.newreference(:configuration, :depth => 1, :doc => "A reference for all configuration parameters") do
- docs = {}
- Puppet.settings.each do |name, object|
- docs[name] = object
+ docs = {}
+ Puppet.settings.each do |name, object|
+ docs[name] = object
+ end
+
+ str = ""
+ docs.sort { |a, b|
+ a[0].to_s <=> b[0].to_s
+ }.each do |name, object|
+ # Make each name an anchor
+ header = name.to_s
+ str += h(header, 3)
+
+ # Print the doc string itself
+ begin
+ str += object.desc.gsub(/\n/, " ")
+ rescue => detail
+ puts detail.backtrace
+ puts detail
+ end
+ str += "\n\n"
+
+ # Now print the data about the item.
+ str += ""
+ val = object.default
+ if name.to_s == "vardir"
+ val = "/var/lib/puppet"
+ elsif name.to_s == "confdir"
+ val = "/etc/puppet"
end
- str = ""
- docs.sort { |a, b|
- a[0].to_s <=> b[0].to_s
- }.each do |name, object|
- # Make each name an anchor
- header = name.to_s
- str += h(header, 3)
-
- # Print the doc string itself
- begin
- str += object.desc.gsub(/\n/, " ")
- rescue => detail
- puts detail.backtrace
- puts detail
- end
- str += "\n\n"
-
- # Now print the data about the item.
- str += ""
- val = object.default
- if name.to_s == "vardir"
- val = "/var/lib/puppet"
- elsif name.to_s == "confdir"
- val = "/etc/puppet"
- end
-
- # Leave out the section information; it was apparently confusing people.
- #str += "- **Section**: #{object.section}\n"
- unless val == ""
- str += "- **Default**: #{val}\n"
- end
- str += "\n"
+ # Leave out the section information; it was apparently confusing people.
+ #str += "- **Section**: #{object.section}\n"
+ unless val == ""
+ str += "- **Default**: #{val}\n"
end
+ str += "\n"
+ end
- return str
+ return str
end
config.header = "
@@ -57,14 +57,14 @@ 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 ``/private/puppet``::
- $ puppet agent --confdir=/private/puppet
+ $ puppet agent --confdir=/private/puppet
Note that boolean options are turned on and off with a slightly different
syntax on the command line::
- $ puppet agent --storeconfigs
+ $ puppet agent --storeconfigs
- $ puppet agent --no-storeconfigs
+ $ puppet agent --no-storeconfigs
The invocations above will enable and disable, respectively, the storage of
the client configuration.
@@ -89,9 +89,9 @@ File Format
The file follows INI-style formatting. Here is an example of a very simple
``puppet.conf`` file::
- [main]
- confdir = /private/puppet
- storeconfigs = true
+ [main]
+ confdir = /private/puppet
+ storeconfigs = true
Note that boolean parameters must be explicitly specified as `true` or
`false` as seen above.
@@ -99,8 +99,8 @@ Note that boolean parameters must be explicitly specified as `true` or
If you need to change file parameters (e.g., reset the mode or owner), do
so within curly braces on the same line::
- [main]
- myfile = /tmp/whatever {owner = root, mode = 644}
+ [main]
+ myfile = /tmp/whatever {owner = root, mode = 644}
If you're starting out with a fresh configuration, you may wish to let
the executable generate a template configuration file for you by invoking
@@ -108,7 +108,7 @@ the executable in question with the `--genconfig` command. The executable
will print a template configuration to standard output, which can be
redirected to a file like so::
- $ puppet agent --genconfig > /etc/puppet/puppet.conf
+ $ puppet agent --genconfig > /etc/puppet/puppet.conf
Note that this invocation will replace the contents of any pre-existing
`puppet.conf` file, so make a backup of your present config if it contains
@@ -119,12 +119,12 @@ 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
likewise be redirected to a file::
- $ puppet agent --genmanifest > /etc/puppet/manifests/site.pp
+ $ puppet agent --genmanifest > /etc/puppet/manifests/site.pp
Puppet can also create user and group accounts for itself (one `puppet` group
and one `puppet` user) if it is invoked as `root` with the `--mkusers` argument::
- $ puppet agent --mkusers
+ $ puppet agent --mkusers
Signals
-------