diff options
author | James Turnbull <james@lovedthanlost.net> | 2008-12-13 23:49:01 +1100 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-12-13 23:49:01 +1100 |
commit | 6d5a1295c9d9771d2dd648b45f4928d8fc4517e0 (patch) | |
tree | e9b5a8202666a475fd825bb7a2b6c6af2a3f394a /lib | |
parent | 45144a1b9da2839fd9f8a182a8f82ecb06e17292 (diff) | |
download | puppet-6d5a1295c9d9771d2dd648b45f4928d8fc4517e0.tar.gz puppet-6d5a1295c9d9771d2dd648b45f4928d8fc4517e0.tar.xz puppet-6d5a1295c9d9771d2dd648b45f4928d8fc4517e0.zip |
Documentation fixes
Diffstat (limited to 'lib')
24 files changed, 181 insertions, 130 deletions
diff --git a/lib/puppet/provider/computer/computer.rb b/lib/puppet/provider/computer/computer.rb index 76d0f1883..f3e526105 100644 --- a/lib/puppet/provider/computer/computer.rb +++ b/lib/puppet/provider/computer/computer.rb @@ -2,7 +2,6 @@ require 'puppet/provider/nameservice/directoryservice' Puppet::Type.type(:computer).provide :directoryservice, :parent => Puppet::Provider::NameService::DirectoryService do desc "Computer object management using DirectoryService on OS X. - Note that these are distinctly different kinds of objects to 'hosts', as they require a MAC address and can have all sorts of policy attached to them. @@ -12,6 +11,7 @@ Puppet::Type.type(:computer).provide :directoryservice, :parent => Puppet::Provi If you wish to manage /etc/hosts on Mac OS X, then simply use the host type as per other platforms. + " confine :operatingsystem => :darwin @@ -19,4 +19,4 @@ Puppet::Type.type(:computer).provide :directoryservice, :parent => Puppet::Provi # hurray for abstraction. The nameservice directoryservice provider can # handle everything we need. super. -end
\ No newline at end of file +end diff --git a/lib/puppet/provider/group/directoryservice.rb b/lib/puppet/provider/group/directoryservice.rb index 2f393052b..fd89698ce 100644 --- a/lib/puppet/provider/group/directoryservice.rb +++ b/lib/puppet/provider/group/directoryservice.rb @@ -15,7 +15,9 @@ require 'puppet/provider/nameservice/directoryservice' Puppet::Type.type(:group).provide :directoryservice, :parent => Puppet::Provider::NameService::DirectoryService do - desc "Group management using DirectoryService on OS X." + desc "Group management using DirectoryService on OS X. + + " commands :dscl => "/usr/bin/dscl" confine :operatingsystem => :darwin diff --git a/lib/puppet/provider/group/groupadd.rb b/lib/puppet/provider/group/groupadd.rb index 371beee19..ccd631a75 100644 --- a/lib/puppet/provider/group/groupadd.rb +++ b/lib/puppet/provider/group/groupadd.rb @@ -1,8 +1,11 @@ require 'puppet/provider/nameservice/objectadd' Puppet::Type.type(:group).provide :groupadd, :parent => Puppet::Provider::NameService::ObjectAdd do - desc "Group management via ``groupadd`` and its ilk. The default - for most platforms" + desc "Group management via ``groupadd`` and its ilk. + + The default for most platforms + + " commands :add => "groupadd", :delete => "groupdel", :modify => "groupmod" diff --git a/lib/puppet/provider/group/ldap.rb b/lib/puppet/provider/group/ldap.rb index 37a7e7343..5a41065f0 100644 --- a/lib/puppet/provider/group/ldap.rb +++ b/lib/puppet/provider/group/ldap.rb @@ -1,16 +1,18 @@ require 'puppet/provider/ldap' Puppet::Type.type(:group).provide :ldap, :parent => Puppet::Provider::Ldap do - desc "Group management via ``ldap``. This provider requires that you - have valid values for all of the ldap-related settings, - including ``ldapbase``. You will also almost definitely need settings - for ``ldapuser`` and ``ldappassword``, so that your clients can write - to ldap. + desc "Group management via ``ldap``. + + This provider requires that you have valid values for all of the + ldap-related settings, including ``ldapbase``. You will also almost + definitely need settings for ``ldapuser`` and ``ldappassword``, so that + your clients can write to ldap. - Note that this provider will automatically generate a GID for you if - you do not specify one, but it is a potentially expensive operation, - as it iterates across all existing groups to pick the appropriate next - one." + Note that this provider will automatically generate a GID for you if you do + not specify one, but it is a potentially expensive operation, as it + iterates across all existing groups to pick the appropriate next one. + + " confine :true => Puppet.features.ldap?, :false => (Puppet[:ldapuser] == "") diff --git a/lib/puppet/provider/group/netinfo.rb b/lib/puppet/provider/group/netinfo.rb index 7c3539eae..4b8fc5f9e 100644 --- a/lib/puppet/provider/group/netinfo.rb +++ b/lib/puppet/provider/group/netinfo.rb @@ -6,7 +6,9 @@ require 'puppet/provider/nameservice/netinfo' Puppet::Type.type(:group).provide :netinfo, :parent => Puppet::Provider::NameService::NetInfo do - desc "Group management using NetInfo." + desc "Group management using NetInfo. + + " commands :nireport => "nireport", :niutil => "niutil" end diff --git a/lib/puppet/provider/group/pw.rb b/lib/puppet/provider/group/pw.rb index 3c384cd6d..4c7ba795e 100644 --- a/lib/puppet/provider/group/pw.rb +++ b/lib/puppet/provider/group/pw.rb @@ -1,7 +1,11 @@ require 'puppet/provider/nameservice/pw' Puppet::Type.type(:group).provide :pw, :parent => Puppet::Provider::NameService::PW do - desc "Group management via ``pw``. Only works on FreeBSD." + desc "Group management via ``pw``. + + Only works on FreeBSD. + + " commands :pw => "/usr/sbin/pw" defaultfor :operatingsystem => :freebsd diff --git a/lib/puppet/provider/host/netinfo.rb b/lib/puppet/provider/host/netinfo.rb index 07a9362c5..55294958c 100644 --- a/lib/puppet/provider/host/netinfo.rb +++ b/lib/puppet/provider/host/netinfo.rb @@ -4,8 +4,11 @@ require 'puppet/provider/nameservice/netinfo' Puppet::Type.type(:host).provide :netinfo, :parent => Puppet::Provider::NameService::NetInfo, :netinfodir => "machines" do - desc "Host management in NetInfo. This provider is highly experimental and is known - not to work currently." + desc "Host management in NetInfo. + + This provider is highly experimental and is known not to work currently. + + " commands :nireport => "nireport", :niutil => "niutil" commands :mountcmd => "mount", :umount => "umount", :df => "df" diff --git a/lib/puppet/provider/macauthorization/macauthorization.rb b/lib/puppet/provider/macauthorization/macauthorization.rb index 2cdef6c12..fce158e2a 100644 --- a/lib/puppet/provider/macauthorization/macauthorization.rb +++ b/lib/puppet/provider/macauthorization/macauthorization.rb @@ -5,7 +5,9 @@ require 'tempfile' Puppet::Type.type(:macauthorization).provide :macauthorization, :parent => Puppet::Provider do - desc "Manage Mac OS X authorization database rules and rights." + desc "Manage Mac OS X authorization database rules and rights. + + " commands :security => "/usr/bin/security" commands :sw_vers => "/usr/bin/sw_vers" @@ -310,4 +312,4 @@ Puppet::Type.type(:macauthorization).provide :macauthorization, :parent => Puppe @property_hash[:auth_type] = value end -end
\ No newline at end of file +end diff --git a/lib/puppet/provider/mcx/mcxcontent.rb b/lib/puppet/provider/mcx/mcxcontent.rb index 27c583ed1..1fea60ca0 100644 --- a/lib/puppet/provider/mcx/mcxcontent.rb +++ b/lib/puppet/provider/mcx/mcxcontent.rb @@ -23,16 +23,18 @@ Puppet::Type.type(:mcx).provide :mcxcontent, :parent => Puppet::Provider do desc "MCX Settings management using DirectoryService on OS X. -This provider manages the entire MCXSettings attribute available -to some directory services nodes. This management is 'all or nothing' -in that discrete application domain key value pairs are not managed -by this provider. + This provider manages the entire MCXSettings attribute available + to some directory services nodes. This management is 'all or nothing' + in that discrete application domain key value pairs are not managed + by this provider. -It is recommended to use WorkGroup Manager to configure Users, Groups, -Computers, or ComputerLists, then use 'ralsh mcx' to generate a puppet -manifest from the resulting configuration. + It is recommended to use WorkGroup Manager to configure Users, Groups, + Computers, or ComputerLists, then use 'ralsh mcx' to generate a puppet + manifest from the resulting configuration. -Original Author: Jeff McCune (mccune.jeff@gmail.com)" + Original Author: Jeff McCune (mccune.jeff@gmail.com) + +" # This provides a mapping of puppet types to DirectoryService # type strings. diff --git a/lib/puppet/provider/service/base.rb b/lib/puppet/provider/service/base.rb index 8964322b6..2f456886a 100755 --- a/lib/puppet/provider/service/base.rb +++ b/lib/puppet/provider/service/base.rb @@ -1,10 +1,13 @@ Puppet::Type.type(:service).provide :base do - desc "The simplest form of service support. You have to specify - enough about your service for this to work; the minimum you can specify - is a binary for starting the process, and this same binary will be - searched for in the process table to stop the service. It is - preferable to specify start, stop, and status commands, akin to how you - would do so using ``init``." + desc "The simplest form of service support. + + You have to specify enough about your service for this to work; the + minimum you can specify is a binary for starting the process, and this + same binary will be searched for in the process table to stop the + service. It is preferable to specify start, stop, and status commands, + akin to how you would do so using ``init``. + + " commands :kill => "kill" diff --git a/lib/puppet/provider/service/daemontools.rb b/lib/puppet/provider/service/daemontools.rb index 46729e1b1..e8d116a67 100644 --- a/lib/puppet/provider/service/daemontools.rb +++ b/lib/puppet/provider/service/daemontools.rb @@ -2,37 +2,37 @@ # # author Brice Figureau <brice-puppet@daysofwonder.com> Puppet::Type.type(:service).provide :daemontools, :parent => :base do - desc """ -Daemontools service management. -This provider manages daemons running supervised by D.J.Bernstein daemontools. -It tries to detect the service directory, with by order of preference:: + desc """Daemontools service management. - * /service - * /etc/service - * /var/lib/svscan + This provider manages daemons running supervised by D.J.Bernstein daemontools. + It tries to detect the service directory, with by order of preference: -The daemon directory should be placed in a directory that can be -by default in:: + * /service + * /etc/service + * /var/lib/svscan - * /var/lib/service - * /etc + The daemon directory should be placed in a directory that can be + by default in: -or this can be overriden in the service resource parameters:: + * /var/lib/service + * /etc - service { - \"myservice\": - provider => \"daemontools\", path => \"/path/to/daemons\"; - } + or this can be overriden in the service resource parameters:: -This provider supports out of the box:: + service { + \"myservice\": + provider => \"daemontools\", path => \"/path/to/daemons\"; + } - * start/stop (mapped to enable/disable) - * enable/disable - * restart - * status + This provider supports out of the box: + * start/stop (mapped to enable/disable) + * enable/disable + * restart + * status -""" + + """ commands :svc => "/usr/bin/svc" commands :svstat => "/usr/bin/svstat" diff --git a/lib/puppet/provider/service/debian.rb b/lib/puppet/provider/service/debian.rb index ca433cbe6..48d509871 100755 --- a/lib/puppet/provider/service/debian.rb +++ b/lib/puppet/provider/service/debian.rb @@ -1,8 +1,12 @@ # Manage debian services. Start/stop is the same as InitSvc, but enable/disable # is special. Puppet::Type.type(:service).provide :debian, :parent => :init do - desc "Debian's form of ``init``-style management. The only difference - is that this supports service enabling and disabling via ``update-rc.d``." + desc "Debian's form of ``init``-style management. + + The only difference is that this supports service enabling and disabling + via ``update-rc.d``. + + " commands :update => "/usr/sbin/update-rc.d" defaultfor :operatingsystem => [:debian, :ubuntu] diff --git a/lib/puppet/provider/service/freebsd.rb b/lib/puppet/provider/service/freebsd.rb index 95bde7784..356feeee4 100644 --- a/lib/puppet/provider/service/freebsd.rb +++ b/lib/puppet/provider/service/freebsd.rb @@ -1,7 +1,10 @@ # Manage FreeBSD services. Puppet::Type.type(:service).provide :freebsd, :parent => :init do - desc "FreeBSD's (and probably NetBSD?) form of ``init``-style service - management; uses ``rc.conf.d`` for service enabling and disabling." + desc "FreeBSD's (and probably NetBSD?) form of ``init``-style service management. + + Uses ``rc.conf.d`` for service enabling and disabling. + +" confine :operatingsystem => [:freebsd, :netbsd, :openbsd] diff --git a/lib/puppet/provider/service/gentoo.rb b/lib/puppet/provider/service/gentoo.rb index d84aaf6a8..4067dee5e 100644 --- a/lib/puppet/provider/service/gentoo.rb +++ b/lib/puppet/provider/service/gentoo.rb @@ -1,8 +1,11 @@ # Manage gentoo services. Start/stop is the same as InitSvc, but enable/disable # is special. Puppet::Type.type(:service).provide :gentoo, :parent => :init do - desc "Gentoo's form of ``init``-style service - management; uses ``rc-update`` for service enabling and disabling." + desc "Gentoo's form of ``init``-style service management. + + Uses ``rc-update`` for service enabling and disabling. + + " commands :update => "/sbin/rc-update" diff --git a/lib/puppet/provider/service/init.rb b/lib/puppet/provider/service/init.rb index 46fa2216e..cbc7afdc4 100755 --- a/lib/puppet/provider/service/init.rb +++ b/lib/puppet/provider/service/init.rb @@ -1,10 +1,14 @@ # The standard init-based service type. Many other service types are # customizations of this module. Puppet::Type.type(:service).provide :init, :parent => :base do - desc "Standard init service management. This provider assumes that the - init script has no ``status`` command, because so few scripts do, - so you need to either provide a status command or specify via - ``hasstatus`` that one already exists in the init script." + desc "Standard init service management. + + This provider assumes that the init script has no ``status`` command, + because so few scripts do, so you need to either provide a status + command or specify via ``hasstatus`` that one already exists in the + init script. + +" class << self attr_accessor :defpath diff --git a/lib/puppet/provider/service/launchd.rb b/lib/puppet/provider/service/launchd.rb index 11d7bd2b4..891c96bd8 100644 --- a/lib/puppet/provider/service/launchd.rb +++ b/lib/puppet/provider/service/launchd.rb @@ -30,10 +30,11 @@ Puppet::Type.type(:service).provide :launchd, :parent => :base do * started => job loaded * enabled => 'Disable' removed from job plist file * disabled => 'Disable' added to job plist file - + Note that this allows you to do something launchctl can't do, which is to be in a state of \"stopped/enabled\ or \"running/disabled\". - " + + " commands :launchctl => "/bin/launchctl" diff --git a/lib/puppet/provider/service/redhat.rb b/lib/puppet/provider/service/redhat.rb index faa75476d..c6c3540f5 100755 --- a/lib/puppet/provider/service/redhat.rb +++ b/lib/puppet/provider/service/redhat.rb @@ -1,8 +1,11 @@ # Manage Red Hat services. Start/stop uses /sbin/service and enable/disable uses chkconfig Puppet::Type.type(:service).provide :redhat, :parent => :init do - desc "Red Hat's (and probably many others) form of ``init``-style service - management; uses ``chkconfig`` for service enabling and disabling." + desc "Red Hat's (and probably many others) form of ``init``-style service management: + + Uses ``chkconfig`` for service enabling and disabling. + + " commands :chkconfig => "/sbin/chkconfig", :service => "/sbin/service" diff --git a/lib/puppet/provider/service/runit.rb b/lib/puppet/provider/service/runit.rb index e8a0da18f..1bd954207 100644 --- a/lib/puppet/provider/service/runit.rb +++ b/lib/puppet/provider/service/runit.rb @@ -2,33 +2,33 @@ # # author Brice Figureau <brice-puppet@daysofwonder.com> Puppet::Type.type(:service).provide :runit, :parent => :daemontools do - desc """ -Runit service management. -This provider manages daemons running supervised by Runit. -It tries to detect the service directory, with by order of preference:: + desc """Runit service management. - * /service - * /var/service - * /etc/service + This provider manages daemons running supervised by Runit. + It tries to detect the service directory, with by order of preference: -The daemon directory should be placed in a directory that can be -by default in:: + * /service + * /var/service + * /etc/service - * /etc/sv + The daemon directory should be placed in a directory that can be + by default in: -or this can be overriden in the service resource parameters:: + * /etc/sv - service { - \"myservice\": - provider => \"runit\", path => \"/path/to/daemons\"; - } + or this can be overriden in the service resource parameters:: -This provider supports out of the box:: + service { + \"myservice\": + provider => \"runit\", path => \"/path/to/daemons\"; + } - * start/stop - * enable/disable - * restart - * status + This provider supports out of the box: + + * start/stop + * enable/disable + * restart + * status """ diff --git a/lib/puppet/provider/service/smf.rb b/lib/puppet/provider/service/smf.rb index ab1fe88c2..4010e7457 100755 --- a/lib/puppet/provider/service/smf.rb +++ b/lib/puppet/provider/service/smf.rb @@ -1,9 +1,12 @@ # Solaris 10 SMF-style services. Puppet::Type.type(:service).provide :smf, :parent => :base do - desc "Support for Sun's new Service Management Framework. Starting a service - is effectively equivalent to enabling it, so there is only support - for starting and stopping services, which also enables and disables them, - respectively." + desc "Support for Sun's new Service Management Framework. + + Starting a service is effectively equivalent to enabling it, so there is + only support for starting and stopping services, which also enables and + disables them, respectively. + + " defaultfor :operatingsystem => :solaris diff --git a/lib/puppet/type/augeas.rb b/lib/puppet/type/augeas.rb index 058ea2fd9..67b62e886 100644 --- a/lib/puppet/type/augeas.rb +++ b/lib/puppet/type/augeas.rb @@ -31,14 +31,16 @@ Puppet::Type.newtype(:augeas) do - augeas to be installed (http://www.augeas.net) - ruby-augeas bindings - Sample usage with a string: + Sample usage with a string:: + augeas{\"test1\" : context => \"/files/etc/sysconfig/firstboot\", changes => \"set RUN_FIRSTBOOT YES\", onlyif => \"match other_value size > 0\", } - Sample usage with an array and custom lenses: + Sample usage with an array and custom lenses:: + augeas{\"jboss_conf\": context => \"/files\", changes => [ @@ -47,6 +49,7 @@ Puppet::Type.newtype(:augeas) do ], load_path => \"$/usr/share/jbossas/lenses\", } + " newparam (:name) do @@ -61,19 +64,21 @@ Puppet::Type.newtype(:augeas) do newparam (:onlyif) do desc "Optional augeas command and comparisons to control the execution of this type. - Supported onlyif syntax: + Supported onlyif syntax:: + get [AUGEAS_PATH] [COMPARATOR] [STRING] match [MATCH_PATH] size [COMPARATOR] [INT] match [MATCH_PATH] include [STRING] match [MATCH_PATH] == [AN_ARRAY] - where + where:: + AUGEAS_PATH is a valid path scoped by the context MATCH_PATH is a valid match synatx scoped by the context COMPARATOR is in the set [> >= != == <= <] STRING is a string INT is a number - AN_ARRAY is in the form ['a string', 'another'] " + AN_ARRAY is in the form ['a string', 'another']" defaultto "" end @@ -81,14 +86,14 @@ Puppet::Type.newtype(:augeas) do newparam(:changes) do desc "The changes which should be applied to the filesystem. This can be either a string which contains a command or an array of commands. - Commands supported are: - - set [PATH] [VALUE] Sets the value VALUE at loction PATH - rm [PATH] Removes the node at location PATH - remove [PATH] Synonym for rm - clear [PATH] Keeps the node at PATH, but removes the value. - ins [PATH] Inserts an empty node at PATH. - insert [PATH] Synonym for ins + Commands supported are:: + + set [PATH] [VALUE] Sets the value VALUE at loction PATH + rm [PATH] Removes the node at location PATH + remove [PATH] Synonym for rm + clear [PATH] Keeps the node at PATH, but removes the value. + ins [PATH] Inserts an empty node at PATH. + insert [PATH] Synonym for ins If the parameter 'context' is set that that value is prepended to PATH" diff --git a/lib/puppet/type/computer.rb b/lib/puppet/type/computer.rb index ccbcadf72..0888325a8 100644 --- a/lib/puppet/type/computer.rb +++ b/lib/puppet/type/computer.rb @@ -1,19 +1,20 @@ Puppet::Type.newtype(:computer) do - @doc = "Computer object management using DirectoryService on OS X. - - Note that these are distinctly different kinds of objects to 'hosts', - as they require a MAC address and can have all sorts of policy attached to - them. - - This provider only manages Computer objects in the local directory service - domain, not in remote directories. - - If you wish to manage /etc/hosts on Mac OS X, then simply use the host - type as per other platforms. - - This type primarily exists to create localhost Computer objects that MCX - policy can then be attached to." + @doc = "Computer object management using DirectoryService + on OS X. + + Note that these are distinctly different kinds of objects to 'hosts', + as they require a MAC address and can have all sorts of policy attached to + them. + + This provider only manages Computer objects in the local directory service + domain, not in remote directories. + + If you wish to manage /etc/hosts on Mac OS X, then simply use the host + type as per other platforms. + + This type primarily exists to create localhost Computer objects that MCX + policy can then be attached to." # ensurable @@ -58,4 +59,4 @@ Puppet::Type.newtype(:computer) do desc "The IP Address of the Computer object." end -end
\ No newline at end of file +end diff --git a/lib/puppet/type/exec.rb b/lib/puppet/type/exec.rb index d7c3a8a39..a211f8572 100755 --- a/lib/puppet/type/exec.rb +++ b/lib/puppet/type/exec.rb @@ -391,7 +391,8 @@ module Puppet Note that this command follows the same rules as the main command, which is to say that it must be fully qualified if the path is not set. - Also note that onlyif can take an array as its value, eg: + Also note that onlyif can take an array as its value, eg:: + onlyif => [\"test -f /tmp/file1\", \"test -f /tmp/file2\"] This will only run the exec if /all/ conditions in the array return true. diff --git a/lib/puppet/type/macauthorization.rb b/lib/puppet/type/macauthorization.rb index 46e02ddae..0265242dc 100644 --- a/lib/puppet/type/macauthorization.rb +++ b/lib/puppet/type/macauthorization.rb @@ -1,9 +1,8 @@ Puppet::Type.newtype(:macauthorization) do @doc = "Manage the Mac OS X authorization database. - - See: http://developer.apple.com/documentation/Security/Conceptual/Security_Overview/Security_Services/chapter_4_section_5.html - for more information." + See: + http://developer.apple.com/documentation/Security/Conceptual/Security_Overview/Security_Services/chapter_4_section_5.html for more information." ensurable diff --git a/lib/puppet/type/mcx.rb b/lib/puppet/type/mcx.rb index ec33afd13..f92cc467d 100644 --- a/lib/puppet/type/mcx.rb +++ b/lib/puppet/type/mcx.rb @@ -51,10 +51,11 @@ to other machines. newparam(:name) do desc "The name of the resource being managed. - The default naming convention follows Directory Service paths: - '/Computers/localhost' - '/Groups/admin' - '/Users/localadmin' + The default naming convention follows Directory Service paths:: + + /Computers/localhost + /Groups/admin + /Users/localadmin The ds_type and ds_name type parameters are not necessary if the default naming convention is followed." |