diff options
author | James Turnbull <james@lovedthanlost.net> | 2010-08-12 00:53:10 +1000 |
---|---|---|
committer | Markus Roberts <Markus@reality.com> | 2010-08-11 22:14:40 -0700 |
commit | 62435e551b3118b1663c67d66a9cae9f52607bc7 (patch) | |
tree | ecaa51a4631b345461586e7b118ac6cf3f346c83 /lib/puppet/reference/configuration.rb | |
parent | e4b2aa6e48af43e83e6954d9253ef9b38d8c36ae (diff) | |
download | puppet-62435e551b3118b1663c67d66a9cae9f52607bc7.tar.gz puppet-62435e551b3118b1663c67d66a9cae9f52607bc7.tar.xz puppet-62435e551b3118b1663c67d66a9cae9f52607bc7.zip |
Rewrote functions documentation to Markdown
Diffstat (limited to 'lib/puppet/reference/configuration.rb')
-rw-r--r-- | lib/puppet/reference/configuration.rb | 71 |
1 files changed, 37 insertions, 34 deletions
diff --git a/lib/puppet/reference/configuration.rb b/lib/puppet/reference/configuration.rb index bfa2cb802..fadd1a423 100644 --- a/lib/puppet/reference/configuration.rb +++ b/lib/puppet/reference/configuration.rb @@ -33,7 +33,7 @@ config = Puppet::Util::Reference.newreference(:configuration, :depth => 1, :doc # Leave out the section information; it was apparently confusing people. #str += "- **Section**: #{object.section}\n" unless val == "" - str += "- **Default**: #{val}\n" + str += "- *Default*: #{val}\n" end str += "\n" end @@ -47,7 +47,7 @@ Specifying Configuration Parameters On The Command-Line +++++++++++++++++++ -Every Puppet executable (with the exception of ``puppetdoc``) accepts all of +Every Puppet executable (with the exception of `puppetdoc`) accepts all of the parameters below, but not all of the arguments make sense for every executable. I have tried to be as thorough as possible in the descriptions of the @@ -55,60 +55,61 @@ arguments, so it should be obvious whether an argument is appropriate or not. 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``:: +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:: +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. Configuration Files +++++++++++++++++++ + 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 ``/etc/puppet``, and as a regular user, the -default configuration directory is ``~user/.puppet``. As of 0.23.0, all -executables look for ``puppet.conf`` in their configuration directory +default configuration directory is `/etc/puppet`, and as a regular user, the +default configuration directory is `~user/.puppet`. As of 0.23.0, all +executables look for `puppet.conf` in their configuration directory (although they previously looked for separate files). For example, -``puppet.conf`` is located at ``/etc/puppet/puppet.conf`` as root and -``~user/.puppet/puppet.conf`` as a regular user by default. +`puppet.conf` is located at `/etc/puppet/puppet.conf` as `root` and +`~user/.puppet/puppet.conf` as a regular user by default. -All executables will set any parameters set within the ``main`` section, -and each executable will also use one of the ``master``, ``agent``, or -``user`` sections. +All executables will set any parameters set within the `[main]` section, +and each executable will also use one of the `[master]`, `[agent]`. File Format ''''''''''' + The file follows INI-style formatting. Here is an example of a very simple -``puppet.conf`` file:: +`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. If you need to change file parameters (e.g., reset the mode or owner), do -so within curly braces on the same line:: +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 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:: +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 @@ -117,28 +118,30 @@ valuable information. Like the `--genconfig` argument, the executables also accept a `--genmanifest` 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:: +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:: +and one `puppet` user) if it is invoked as `root` with the `--mkusers` argument: - $ puppet agent --mkusers + $ puppet agent --mkusers Signals ------- -The ``puppet agent`` and ``puppet master`` executables catch some signals for special -handling. Both daemons catch (``SIGHUP``), which forces the server to restart -tself. Predictably, interrupt and terminate (``SIGINT`` and ``SIGTERM``) will shut -down the server, whether it be an instance of ``puppet agent`` or ``puppet master``. -Sending the ``SIGUSR1`` signal to an instance of ``puppet agent`` will cause it to +The `puppet agent` and `puppet master` executables catch some signals for special +handling. Both daemons catch (`SIGHUP`), which forces the server to restart +tself. Predictably, interrupt and terminate (`SIGINT` and `SIGTERM`) will shut +down the server, whether it be an instance of `puppet agent` or `puppet master`. + +Sending the `SIGUSR1` signal to an instance of `puppet agent` will cause it to immediately begin a new configuration transaction with the server. This -signal has no effect on ``puppet master``. +signal has no effect on `puppet master`. Configuration Parameter Reference --------------------------------- + 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. |