summaryrefslogtreecommitdiffstats
path: root/doc/server/plugins/generators/rules.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/server/plugins/generators/rules.txt')
-rw-r--r--doc/server/plugins/generators/rules.txt320
1 files changed, 214 insertions, 106 deletions
diff --git a/doc/server/plugins/generators/rules.txt b/doc/server/plugins/generators/rules.txt
index 34be180bf..ca40eae70 100644
--- a/doc/server/plugins/generators/rules.txt
+++ b/doc/server/plugins/generators/rules.txt
@@ -9,24 +9,29 @@ Rules
The Rules plugin resolves the following Abstract Configuration Entities:
* Service
-* Directory
-* SymLink
* Package
* Path
-* Permissions
* Action
-to literal configuration entries suitable for the client drivers to consume.
+to literal configuration entries suitable for the client drivers to
+consume.
-For an entity specification to be included in the Literal configuration the name attribute from an Abstract Entity Tag (from Base or Bundler) must match the name attribute of an Entity tag in Rules, along with the appropriate group associations of course.
+For an entity specification to be included in the Literal configuration
+the name attribute from an Abstract Entity Tag (from Base or Bundler)
+must match the name attribute of an Entity tag in Rules, along with the
+appropriate group associations of course.
-Each file in the Rules directory has a priority. This allows the same Entities to be served by multiple files. The priorities can be used to break ties in the case that multiple files serve data for the same Entity.
+Each file in the Rules directory has a priority. This allows the same
+Entities to be served by multiple files. The priorities can be used to
+break ties in the case that multiple files serve data for the same Entity.
Usage of Groups in Rules
========================
-Groups are used by the Rules plugin, along with host metadata, for selecting the Configuration Entity entries to include in the clients literal configuration. They can be thought of as::
+Groups are used by the Rules plugin, along with host metadata, for
+selecting the Configuration Entity entries to include in the clients
+literal configuration. They can be thought of as::
if client is a member of group1 then
assign to literal config
@@ -46,44 +51,62 @@ Rules Tag
The Rules Tag may have the following attributes:
-|| '' '''Name''' '' || '' '''Description''' '' || '' '''Values''' '' ||
-|| priority || Sets the priority for Rules in this Rules list.The higher value wins. || String ||
++----------+-------------------------------------+--------+
+| Name | Description | Values |
++==========+=====================================+========+
+| priority | Sets the priority for Rules in this | String |
+| | Rules list.The higher value wins. | |
++----------+-------------------------------------+--------+
Rules Group Tag
---------------
The Rules Group Tag may have the following attributes:
-|| '' '''Name''' '' || '' '''Description''' '' || '' '''Values''' '' ||
-|| name || Group Name || String ||
-|| negate || Negate group membership (is not a member of) || (True|False) ||
++--------+-------------------------+--------------+
+| Name | Description | Values |
++========+=========================+==============+
+| name | Group Name | String |
++--------+-------------------------+--------------+
+| negate | Negate group membership | (True|False) |
+| | (is not a member of) | |
++--------+-------------------------+--------------+
Package Tag
-----------
The Package Tag may have the following attributes:
-|| '' '''Name''' '' || '' '''Description''' '' || '' '''Values''' '' ||
-|| name || Package Name || String ||
-|| version || Package Version orversion='noverify' to not do version checking in the Yum driver only (temporary work a round). || String ||
-|| file || Package file name. Several other attributes (name, version) can be automatically defined based on regular expressions defined in the Pkgmgr plugin. || String ||
-|| simplefile || Package file name. No name parsing is performed, so no extra fields get set || String ||
-|| verify || verify='false' - do not do package verification || String ||
-|| reloc || RPM relocation path. || String ||
-|| multiarch || Comma separated list of the architectures of this package that should be installed. || String ||
-|| srcs || Filename creation rules for multiarch packages. || String ||
-|| type || Package type. (rpm, yum, apt,sysv,blast) || String ||
-
-Permissions Tag
----------------
-
-The Permissions tag is
-
-|| '' '''Name''' '' || '' '''Description''' '' || '' '''Values''' '' ||
-|| name || Name of the file. || String ||
-|| perms || Permissions of the file. || ||
-|| owner || Owner of the file. || ||
-|| group || Group of the file. || ||
++------------+----------------------------------------------+--------+
+| Name | Description | Values |
++============+==============================================+========+
+| name | Package Name | String |
++------------+----------------------------------------------+--------+
+| version | Package Version or version='noverify' to | String |
+| | not do version checking in the Yum driver | |
+| | only (temporary work a round). | |
++------------+----------------------------------------------+--------+
+| file | Package file name. Several other attributes | String |
+| | (name, version) can be automatically defined | |
+| | based on regular expressions defined in the | |
+| | Pkgmgr plugin. | |
++------------+----------------------------------------------+--------+
+| simplefile | Package file name. No name parsing is | String |
+| | performed, so no extra fields get set | |
++------------+----------------------------------------------+--------+
+| verify | verify='false' - do not do package | String |
+| | verification | |
++------------+----------------------------------------------+--------+
+| reloc | RPM relocation path. | String |
++------------+----------------------------------------------+--------+
+| multiarch | Comma separated list of the architectures of | String |
+| | this package that should be installed. | |
++------------+----------------------------------------------+--------+
+| srcs | Filename creation rules for multiarch | String |
+| | packages. | |
++------------+----------------------------------------------+--------+
+| type | Package type. (rpm, yum, apt,sysv,blast) | String |
++------------+----------------------------------------------+--------+
Action Tag
----------
@@ -93,102 +116,187 @@ See [wiki:Plugins/Actions Actions]
Service Tag
-----------
-The Service tag is
-
-|| '' '''Name''' '' || '' '''Description''' '' || '' '''Values''' '' ||
-|| name || Service Name || String ||
-|| status || Should the service be on or off. || (on|off) ||
-|| restart || Service command for restart (default:restart) || String ||
-|| type || Driver to use on the client to manage this service. || (chkconfig|deb|rc-update|smf) ||
-|| sequence || Order for service startup (debian services only) || integer ||
-
-Directory Tag
--------------
-
-The Directory tag is
-
-|| '' '''Name''' '' || '' '''Description''' '' || '' '''Values''' '' ||
-|| name || Directory Name || String ||
-|| perms || Permissions of the directory. || String ||
-|| owner || Owner of the directory || String ||
-|| group || Group Owner of the directory || String ||
-|| prune || prune unspecified entries from the Directory || true|false ||
-
-SymLink Tag
------------
-
-The SymLink tag is
-
-|| '' '''Name''' '' || '' '''Description''' '' || '' '''Values''' '' ||
-|| name || Name of the symlink. || String ||
-|| to || File to link to || String ||
++----------+-----------------------------+-------------------------------+
+| Name | Description | Values |
++==========+=============================+===============================+
+| name | Service Name | String |
++----------+-----------------------------+-------------------------------+
+| status | Should the service be on or | (on|off) |
+| | off. | |
++----------+-----------------------------+-------------------------------+
+| restart | Service command for restart | String |
+| | (default:restart) | |
++----------+-----------------------------+-------------------------------+
+| type | Driver to use on the client | (chkconfig|deb|rc-update|smf) |
+| | to manage this service. | |
++----------+-----------------------------+-------------------------------+
+| sequence | Order for service startup | integer |
+| | (debian services only) | |
++----------+-----------------------------+-------------------------------+
Client Tag
----------
-The Client Tag is used in Rules for selecting the package entries to include in the clients literal configuration. Its function is similar to the Group tag in this context. It can be thought of as::
+The Client Tag is used in Rules for selecting the package entries to
+include in the clients literal configuration. Its function is similar
+to the Group tag in this context. It can be thought of as::
if client is name then
assign to literal config
The Client Tag may have the following attributes:
-|| '' '''Name''' '' || '' '''Description''' '' || '' '''Values''' '' ||
-|| name || Client Name || String ||
-|| negate || Negate client selection (if not client name) || (True|False) ||
++--------+-------------------------+--------------+
+| Name | Description | Values |
++========+=========================+==============+
+| name | Client Name | String |
++--------+-------------------------+--------------+
+| negate | Negate client selection | (True|False) |
+| | (if not client name) | |
++--------+-------------------------+--------------+
Path Tag
--------
-The Path tag is
-
-|| '' '''Name''' '' || '' '''Description''' '' || '' '''Values''' '' ||
-|| name || Name of the file || String ||
-|| type || Type of file || nonexistent ||
-
+The Path tag has different values depending on the *type* attribute of
+the path specified in your configuration. Below is a set of tables which
+describe the attributes available for various Path types.
+
+device
+^^^^^^
+
++----------+---------------------+-------------------+
+| Name | Description | Values |
++==========+=====================+===================+
+| name | Name of the device | String |
++----------+---------------------+-------------------+
+| dev_type | Type of device | (block|char|fifo) |
++----------+---------------------+-------------------+
+| owner | Device owner | String |
++----------+---------------------+-------------------+
+| group | Device group | String |
++----------+---------------------+-------------------+
+| major | Major number (block | integer |
+| | or char devices) | |
++----------+---------------------+-------------------+
+| minor | Minor number (block | integer |
+| | or char devices) | |
++----------+---------------------+-------------------+
+
+directory
+^^^^^^^^^
+
++-------+------------------------------+------------+
+| Name | Description | Values |
++=======+==============================+============+
+| name | Directory Name | String |
++-------+------------------------------+------------+
+| perms | Permissions of the directory | String |
++-------+------------------------------+------------+
+| owner | Owner of the directory | String |
++-------+------------------------------+------------+
+| group | Group Owner of the directory | String |
++-------+------------------------------+------------+
+| prune | prune unspecified entries | true|false |
+| | from the Directory | |
++-------+------------------------------+------------+
+
+hardlink
+^^^^^^^^
+
++------+----------------------+--------+
+| Name | Description | Values |
++======+======================+========+
+| name | Name of the hardlink | String |
++------+----------------------+--------+
+| to | File to link to | String |
++------+----------------------+--------+
+
+nonexistent
+^^^^^^^^^^^
+
++------+--------------------+-------------+
+| Name | Description | Values |
++======+====================+=============+
+| name | Name of the | String |
+| | (nonexistent) file | |
++------+--------------------+-------------+
+| type | Type of file | nonexistent |
++------+--------------------+-------------+
+
+permissions
+^^^^^^^^^^^
+
++-------+--------------------------+--------+
+| Name | Description | Values |
++=======+==========================+========+
+| name | Name of the file. | String |
++-------+--------------------------+--------+
+| perms | Permissions of the file. | String |
++-------+--------------------------+--------+
+| owner | Owner of the file. | String |
++-------+--------------------------+--------+
+| group | Group of the file. | String |
++-------+--------------------------+--------+
+
+symlink
+^^^^^^^
+
++------+----------------------+--------+
+| Name | Description | Values |
++======+======================+========+
+| name | Name of the symlink. | String |
++------+----------------------+--------+
+| to | File to link to | String |
++------+----------------------+--------+
Rules Directory
===============
-The Rules/ directory keeps the XML files that define what rules are available for a host. All the files in the directory are processed.
+The Rules/ directory keeps the XML files that define what rules are
+available for a host. All the files in the directory are processed.
-The names of the XML files have no special meaning to Bcfg2; they are simply named so it's easy for the administrator to know what the contents hold. All Rules could be kept in a single file if so desired. Bcfg2 simply uses the Groups in the files and priorities to determine how to assign Rules to a host's literal configuration.
+The names of the XML files have no special meaning to Bcfg2; they
+are simply named so it's easy for the administrator to know what the
+contents hold. All Rules could be kept in a single file if so desired.
+Bcfg2 simply uses the Groups in the files and priorities to determine
+how to assign Rules to a host's literal configuration.
.. code-block:: xml
<Rules priority="0">
- <Directory group="root" name="/autonfs" owner="root" perms="0755"/>
- <Directory group="utmp" name="/var/run/screen" owner="root" perms="0775"/>
- <Directory group="root" name="/autonfs/stage" owner="root" perms="0755"/>
- <Directory group="root" name="/exports" owner="root" perms="0755"/>
- <Directory name="/etc/condor" owner="root" group="root" perms="0755"/>
- <Directory name="/logs" group="wwwtrans" owner="root" perms="0775"/>
- <Directory name="/mnt" group="root" owner="root" perms="0755"/>
- <Directory name="/my" owner="root" group="root" perms="0755"/>
- <Directory name="/my/bin" owner="root" group="root" perms="0755"/>
- <Directory name="/nfs" owner="root" group="root" perms="0755"/>
- <Directory name="/sandbox" perms="0777" owner="root" group="root"/>
- <Directory name="/software" group="root" owner="root" perms="0755"/>
- <Permissions perms="0555" group="audio" owner="root" name="/dev/dsp"/>
- <Permissions perms="0555" group="audio" owner="root" name="/dev/mixer"/>
- <SymLink name="/bin/whatami" to="/mcs/adm/bin/whatami"/>
- <SymLink name="/chibahomes" to="/nfs/chiba-homefarm"/>
- <SymLink name="/home" to="/nfs/mcs-homefarm"/>
- <SymLink name="/homes" to="/home"/>
- <SymLink name="/mcs" to="/nfs/mcs"/>
- <SymLink name="/my/bin/bash" to="/bin/bash"/>
- <SymLink name="/my/bin/tcsh" to="/bin/tcsh"/>
- <SymLink name="/my/bin/zsh" to="/bin/zsh"/>
- <SymLink name="/software/common" to="/nfs/software-common"/>
- <SymLink name="/software/linux" to="/nfs/software-linux"/>
- <SymLink name="/software/linux-debian_sarge" to="/nfs/linux-debian_sarge"/>
- <SymLink name="/usr/bin/passwd" to="/usr/bin/yppasswd"/>
- <SymLink name="/usr/bin/yppasswd" to="/mcs/bin/passwd"/>
- <SymLink name="/usr/lib/libgd.so.1.8" to="/usr/lib/libgd.so.1.8.4"/>
- <SymLink name="/usr/lib/libtermcap.so.2" to="/usr/lib/libtermcap.so"/>
- <SymLink name="/usr/local/bin/perl" to="/usr/bin/perl"/>
- <SymLink name="/usr/local/bin/perl5" to="/usr/bin/perl"/>
- <SymLink name="/usr/local/bin/tcsh" to="/bin/tcsh"/>
+ <Path type='directory' group="root" name="/autonfs" owner="root" perms="0755"/>
+ <Path type='directory' group="utmp" name="/var/run/screen" owner="root" perms="0775"/>
+ <Path type='directory' group="root" name="/autonfs/stage" owner="root" perms="0755"/>
+ <Path type='directory' group="root" name="/exports" owner="root" perms="0755"/>
+ <Path type='directory' name="/etc/condor" owner="root" group="root" perms="0755"/>
+ <Path type='directory' name="/logs" group="wwwtrans" owner="root" perms="0775"/>
+ <Path type='directory' name="/mnt" group="root" owner="root" perms="0755"/>
+ <Path type='directory' name="/my" owner="root" group="root" perms="0755"/>
+ <Path type='directory' name="/my/bin" owner="root" group="root" perms="0755"/>
+ <Path type='directory' name="/nfs" owner="root" group="root" perms="0755"/>
+ <Path type='directory' name="/sandbox" perms="0777" owner="root" group="root"/>
+ <Path type='directory' name="/software" group="root" owner="root" perms="0755"/>
+ <Path type='permissions' perms="0555" group="audio" owner="root" name="/dev/dsp"/>
+ <Path type='permissions' perms="0555" group="audio" owner="root" name="/dev/mixer"/>
+ <Path type='symlink' name="/bin/whatami" to="/mcs/adm/bin/whatami"/>
+ <Path type='symlink' name="/chibahomes" to="/nfs/chiba-homefarm"/>
+ <Path type='symlink' name="/home" to="/nfs/mcs-homefarm"/>
+ <Path type='symlink' name="/homes" to="/home"/>
+ <Path type='symlink' name="/mcs" to="/nfs/mcs"/>
+ <Path type='symlink' name="/my/bin/bash" to="/bin/bash"/>
+ <Path type='symlink' name="/my/bin/tcsh" to="/bin/tcsh"/>
+ <Path type='symlink' name="/my/bin/zsh" to="/bin/zsh"/>
+ <Path type='symlink' name="/software/common" to="/nfs/software-common"/>
+ <Path type='symlink' name="/software/linux" to="/nfs/software-linux"/>
+ <Path type='symlink' name="/software/linux-debian_sarge" to="/nfs/linux-debian_sarge"/>
+ <Path type='symlink' name="/usr/bin/passwd" to="/usr/bin/yppasswd"/>
+ <Path type='symlink' name="/usr/bin/yppasswd" to="/mcs/bin/passwd"/>
+ <Path type='symlink' name="/usr/lib/libgd.so.1.8" to="/usr/lib/libgd.so.1.8.4"/>
+ <Path type='symlink' name="/usr/lib/libtermcap.so.2" to="/usr/lib/libtermcap.so"/>
+ <Path type='symlink' name="/usr/local/bin/perl" to="/usr/bin/perl"/>
+ <Path type='symlink' name="/usr/local/bin/perl5" to="/usr/bin/perl"/>
+ <Path type='symlink' name="/usr/local/bin/tcsh" to="/bin/tcsh"/>
<Service name='ntpd' status='on' type='chkconfig'/>
<Service name='haldaemon' status='on' type='chkconfig'/>
<Service name='messagebus' status='on' type='chkconfig'/>