diff options
author | James Turnbull <james@lovedthanlost.net> | 2010-09-14 14:24:12 +1000 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2010-09-14 14:24:12 +1000 |
commit | 996f14e8bb457d4b3bb13390954b48780cf18469 (patch) | |
tree | 9c8e4a5d3be212c52c2cc8b2e8cc35db6def6160 /lib | |
parent | cad1e0f69ca19b37901f7f289444feae8f9ebd34 (diff) | |
download | puppet-996f14e8bb457d4b3bb13390954b48780cf18469.tar.gz puppet-996f14e8bb457d4b3bb13390954b48780cf18469.tar.xz puppet-996f14e8bb457d4b3bb13390954b48780cf18469.zip |
Documentation updates for Markdown conversion
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/parser/functions/versioncmp.rb | 6 | ||||
-rw-r--r-- | lib/puppet/reference/configuration.rb | 19 | ||||
-rw-r--r-- | lib/puppet/reference/indirection.rb | 4 | ||||
-rw-r--r-- | lib/puppet/reference/metaparameter.rb | 19 | ||||
-rw-r--r-- | lib/puppet/reference/type.rb | 11 | ||||
-rw-r--r-- | lib/puppet/util/reference.rb | 4 |
6 files changed, 29 insertions, 34 deletions
diff --git a/lib/puppet/parser/functions/versioncmp.rb b/lib/puppet/parser/functions/versioncmp.rb index 94ba3886f..3dbfb5dc4 100644 --- a/lib/puppet/parser/functions/versioncmp.rb +++ b/lib/puppet/parser/functions/versioncmp.rb @@ -14,9 +14,9 @@ Where a and b are arbitrary version strings This functions returns a number: -* > 0 if version a is greater than version b -* == 0 if both version are equals -* < 0 if version a is less than version b +* Greate than 0 if version a is greater than version b +* Equal to 0 if both version are equals +* Less than 0 if version a is less than version b Example: diff --git a/lib/puppet/reference/configuration.rb b/lib/puppet/reference/configuration.rb index fadd1a423..e6a8dc20f 100644 --- a/lib/puppet/reference/configuration.rb +++ b/lib/puppet/reference/configuration.rb @@ -42,11 +42,10 @@ config = Puppet::Util::Reference.newreference(:configuration, :depth => 1, :doc end config.header = " -Specifying Configuration Parameters ------------------------------------ +## Specifying Configuration Parameters + +### On The Command-Line -On The Command-Line -+++++++++++++++++++ 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. @@ -69,8 +68,7 @@ syntax on the command line: The invocations above will enable and disable, respectively, the storage of the client configuration. -Configuration Files -+++++++++++++++++++ +### Configuration Files As mentioned above, the configuration parameters can also be stored in a configuration file, located in the configuration directory. As root, the @@ -84,8 +82,7 @@ executables look for `puppet.conf` in their configuration directory All executables will set any parameters set within the `[main]` section, and each executable will also use one of the `[master]`, `[agent]`. -File Format -''''''''''' +#### File Format The file follows INI-style formatting. Here is an example of a very simple `puppet.conf` file: @@ -127,8 +124,7 @@ and one `puppet` user) if it is invoked as `root` with the `--mkusers` argument: $ puppet agent --mkusers -Signals -------- +## Signals The `puppet agent` and `puppet master` executables catch some signals for special handling. Both daemons catch (`SIGHUP`), which forces the server to restart @@ -139,8 +135,7 @@ 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`. -Configuration Parameter Reference ---------------------------------- +## 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. diff --git a/lib/puppet/reference/indirection.rb b/lib/puppet/reference/indirection.rb index 0cdbb2510..e5b076508 100644 --- a/lib/puppet/reference/indirection.rb +++ b/lib/puppet/reference/indirection.rb @@ -8,12 +8,12 @@ reference = Puppet::Util::Reference.newreference :indirection, :doc => "Indirect Puppet::Indirector::Indirection.instances.sort { |a,b| a.to_s <=> b.to_s }.each do |indirection| ind = Puppet::Indirector::Indirection.instance(indirection) name = indirection.to_s.capitalize - text += indirection.to_s + "\n" + ("-" * name.length) + "\n\n" + text += "## " + indirection.to_s + "\n\n" text += ind.doc + "\n\n" Puppet::Indirector::Terminus.terminus_classes(ind.name).sort { |a,b| a.to_s <=> b.to_s }.each do |terminus| - text += terminus.to_s + "\n" + ("+" * terminus.to_s.length) + "\n\n" + text += "### " + terminus.to_s + "\n\n" term_class = Puppet::Indirector::Terminus.terminus_class(ind.name, terminus) diff --git a/lib/puppet/reference/metaparameter.rb b/lib/puppet/reference/metaparameter.rb index 39c4b7f5f..c16a1d33a 100644 --- a/lib/puppet/reference/metaparameter.rb +++ b/lib/puppet/reference/metaparameter.rb @@ -9,16 +9,17 @@ metaparameter = Puppet::Util::Reference.newreference :metaparameter, :doc => "Al } str = %{ - Metaparameters - -------------- - Metaparameters are parameters that work with any resource type; they are part of the - Puppet framework itself rather than being part of the implementation of any - given instance. Thus, any defined metaparameter can be used with any instance - in your manifest, including defined components. - Available Metaparameters - ++++++++++++++++++++++++ - } +# Metaparameters + +Metaparameters are parameters that work with any resource type; they are part of the +Puppet framework itself rather than being part of the implementation of any +given instance. Thus, any defined metaparameter can be used with any instance +in your manifest, including defined components. + +## Available Metaparameters + +} begin params = [] Puppet::Type.eachmetaparam { |param| diff --git a/lib/puppet/reference/type.rb b/lib/puppet/reference/type.rb index 2378bb83a..847bbc223 100644 --- a/lib/puppet/reference/type.rb +++ b/lib/puppet/reference/type.rb @@ -10,10 +10,9 @@ type = Puppet::Util::Reference.newreference :type, :doc => "All Puppet resource str = %{ - Resource Types - -------------- +## Resource Types - - The *namevar* is the parameter used to uniquely identify a type instance. +- The *namevar* is the parameter used to uniquely identify a type instance. This is the parameter that gets assigned when a string is provided before the colon in a type declaration. In general, only developers will need to worry about which parameter is the `namevar`. @@ -30,11 +29,11 @@ type = Puppet::Util::Reference.newreference :type, :doc => "All Puppet resource dependency handling), and because `path` is the namevar for `file`, that string is assigned to the `path` parameter. - - *Parameters* determine the specific configuration of the instance. They either +- *Parameters* determine the specific configuration of the instance. They either directly modify the system (internally, these are called properties) or they affect how the instance behaves (e.g., adding a search path for `exec` instances or determining recursion on `file` instances). - - *Providers* provide low-level functionality for a given resource type. This is +- *Providers* provide low-level functionality for a given resource type. This is usually in the form of calling out to external commands. When required binaries are specified for providers, fully qualifed paths @@ -42,7 +41,7 @@ type = Puppet::Util::Reference.newreference :type, :doc => "All Puppet resource binaries indicate that Puppet will search for the binary using the shell path. - - *Features* are abilities that some providers might not support. You can use the list +- *Features* are abilities that some providers might not support. You can use the list of supported features to determine how a given provider can be used. Resource types define features they can use, and providers can be tested to see diff --git a/lib/puppet/util/reference.rb b/lib/puppet/util/reference.rb index 4f2058e69..5fedb5f48 100644 --- a/lib/puppet/util/reference.rb +++ b/lib/puppet/util/reference.rb @@ -72,7 +72,7 @@ class Puppet::Util::Reference loaded_instances(:reference).sort { |a,b| a.to_s <=> b.to_s } end - HEADER_LEVELS = [nil, "=", "-", "+", "'", "~"] + HEADER_LEVELS = [nil, "#", "##", "###", "####", "#####"] attr_accessor :page, :depth, :header, :title, :dynamic attr_writer :doc @@ -90,7 +90,7 @@ class Puppet::Util::Reference end def h(name, level) - "#{name}\n#{HEADER_LEVELS[level] * name.to_s.length}\n\n" + "#{HEADER_LEVELS[level]} #{name}\n\n" end def initialize(name, options = {}, &block) |