From f09116e6c1e52ce605c9717dbf103ded29d32a82 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Wed, 28 Apr 2010 18:30:26 +0000 Subject: doc: Add more verbose information about how TCheetah works Signed-off-by: Sol Jerome git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5845 ce84e21b-d406-0410-9b95-82705330c041 --- doc/server/plugins/generators/tcheetah.txt | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/server/plugins/generators/tcheetah.txt b/doc/server/plugins/generators/tcheetah.txt index e5d8de9b5..dc6d69018 100644 --- a/doc/server/plugins/generators/tcheetah.txt +++ b/doc/server/plugins/generators/tcheetah.txt @@ -86,8 +86,12 @@ on the host 'www.example.com':: Simple Example ============== -bcfg2/TCheetah/foo/template ---------------------------- +TCheetah works similar to Cfg in that you define all literal information +about a particular file in a directory rooted at TGenshi/path_to_file. +The actual file contents are placed in a file named `template` in that +directory. Below is a simple example a file ``/foo``. + +``/var/lib/bcfg2/TCheetah/foo/template`` .. code-block:: none @@ -107,8 +111,7 @@ bcfg2/TCheetah/foo/template * $probe -- $self.metadata.Probes[$probe] #end for -bcfg2/TCheetah/foo/info ------------------------ +``/var/lib/bcfg2/TCheetah/foo/info`` .. code-block:: none @@ -144,12 +147,10 @@ current client probe state. Example: Replace the crontab plugin =================================== -In many cases you can use the TCheetah plugin to avoid -writing custom plugins in Python. This example replaces the -[source:tags/bcfg2_0_8_4/bcfg2/src/lib/Server/Plugins/Crontab.py crontab -plugin] (Bcfg2.Server.Plugins.Crontab). This plugin randomizes the time -of cron.daily execution with a stable result. Cron.daily is run at a -consistent, randomized time between midnight and 7am.:: +In many cases you can use the TCheetah plugin to avoid writing custom +plugins in Python. This example randomizes the time of cron.daily +execution with a stable result. Cron.daily is run at a consistent, +randomized time between midnight and 7am.:: #import random #silent random.seed($self.metadata.hostname) -- cgit v1.2.3-1-g7c22