summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/server/plugins/generators/decisions.txt37
-rw-r--r--src/lib/Options.py1
2 files changed, 27 insertions, 11 deletions
diff --git a/doc/server/plugins/generators/decisions.txt b/doc/server/plugins/generators/decisions.txt
index ba01f7fc2..d75c298ef 100644
--- a/doc/server/plugins/generators/decisions.txt
+++ b/doc/server/plugins/generators/decisions.txt
@@ -22,6 +22,11 @@ should be corrected during the current run of the installation tool. The
Decisions plugin is the only stock plugin that generates entries for
client's whitelists or blacklists.
+.. note:: If the client is not explicitly configured to run in
+ whitelist or blacklist mode, the list of entries is not
+ downloaded and decisions is not used. See ``Decision
+ Mode``_ below.
+
The Decisions plugin uses a directory in the Bcfg2 repository called
Decisions. Files in the Decisions subdirectory are named similarly to
files managed by Cfg, probes, TCheetah, and TGenshi (so you can use host-
@@ -37,12 +42,6 @@ the following is an example.
<Decision type='Path' name='/etc/apt/apt.conf'/>
</Decisions>
-.. note:: To add syntax highlighting in vim, you can add a modeline such as this:
-
- <!--
- vim: ft=xml
- -->
-
This example, included as a whitelist due to its name, enables all services,
and the path entry named ``/etc/apt/apt.conf``. All these entries must
already be present in your repository, the Decisions plugin just references
@@ -55,11 +54,27 @@ When a client asks for its whitelist or blacklist, all of the files
pertaining to that client of the correct type are aggregated into a single
list. This list is sent to the client.
-.. note:: This list is only generated when a client is explicitly run with
- the appropriate option (``-l (whitelist|blacklist)``); client
- behavior is not controlled unless this option is used. If you do
- not use Decisions, all your entries will be installed normally.
-.. note:: Also, using this plugin does not present additional prompts or
+.. note:: Using this plugin does not present additional prompts or
safety nets to the administrator running the client, you have to
control these via their respective options (``-I`` or ``-n``, for
example).
+
+To add syntax highlighting to Decisions files in vim and emacs, you
+can add comments such as this::
+
+ <Decisions><!--*- mode: xml; -*-->
+ <!-- vim: set ft=xml : -->
+
+
+=============
+Decision Mode
+=============
+
+The whitelist or blacklist is only generated when a client is run in
+whitelist or blacklist mode. This can either be set at the command
+line with the appropriate option (``-l (whitelist|blacklist)``), or in
+``bcfg2.conf`` by setting ``decision`` in the ``client`` section to
+``whitelist`` or ``blacklist``).
+
+Client behavior is not controlled unless the decision mode is set. If
+you do not use Decisions, all your entries will be installed normally.
diff --git a/src/lib/Options.py b/src/lib/Options.py
index d5304e696..26d0fa349 100644
--- a/src/lib/Options.py
+++ b/src/lib/Options.py
@@ -307,6 +307,7 @@ CLIENT_INDEP = Option('Only configure the given bundle(s)', default=False,
CLIENT_KEVLAR = Option('Run in kevlar (bulletproof) mode', default=False,
cmd='-k', )
CLIENT_DLIST = Option('Run client in server decision list mode', default=False,
+ cf=('client', 'decision'),
cmd='-l', odesc='<whitelist|blacklist>')
CLIENT_FILE = Option('Configure from a file rather than querying the server',
default=False, cmd='-f', odesc='<specification path>')