Documentation fixes
This commit is contained in:
Родитель
45144a1b9d
Коммит
6d5a1295c9
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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``.
|
||||
|
||||
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."
|
||||
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.
|
||||
|
||||
"
|
||||
|
||||
confine :true => Puppet.features.ldap?, :false => (Puppet[:ldapuser] == "")
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -33,7 +33,8 @@ Puppet::Type.type(:service).provide :launchd, :parent => :base do
|
|||
|
||||
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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
"""
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
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
|
||||
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"
|
||||
|
||||
|
|
|
@ -1,19 +1,20 @@
|
|||
Puppet::Type.newtype(:computer) do
|
||||
|
||||
@doc = "Computer object management using DirectoryService on OS X.
|
||||
@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.
|
||||
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.
|
||||
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.
|
||||
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."
|
||||
This type primarily exists to create localhost Computer objects that MCX
|
||||
policy can then be attached to."
|
||||
|
||||
# ensurable
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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."
|
||||
|
|
Загрузка…
Ссылка в новой задаче