help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with TimeClasses


From: Tim Nelson
Subject: Re: Help with TimeClasses
Date: Tue, 25 Jan 2005 11:21:32 +1100 (EST)

On Mon, 24 Jan 2005, Brian E. Seppanen wrote:

I've been using cfengine for a long time, but I've always been using very
minimal aspects of cfengine.  I've been using a complete push environment,
with no hosts using cfexecd.    I have very large configuration
definitions that seem reasonable when used on an infrequent basis.
However, I'm trying to make the jump to using cfexecd and timeclasses,
because I need to eliminate some of the million little scripts all over
the place.    If I cfexecd a config that has absolutely no timeperiods
defined at this time does that mean, that it will A) Always execute no
matter what time?  or B) Will never execute unless pushed.

        I suggest you read the cfexecd reference:
http://www.iu.hio.no/cfengine/docs/cfengine-Reference.html#Cfexecd%20reference

        The answer is in the first section there somewhere.

Probably not the best phrasing, because I just can't quite grasp how to
incorporate it into what I'm currently doing...

Any suggestions...tips.   Thanks for the help.

        I've effectively got a cfagent.conf that goes like this:
------------------------------------
import:
        cf.classes
        cf.fileinc
------------------------------------

        ...and a cf.fileinc that goes like this:
------------------------------------
import:
        any::
                cf.main.all

        ServerPhase_Manual::
                cf.main.old
------------------------------------

ServerPhase_Manual is a class defined in cf.classes. Anyway, my point is that, if you do this, and put your current config in cf.main.old, and add a time class to the ServerPhase_Manual section, it'll only get run eg. once a day, and then you can schedule cf.main.all to run eg. every half hour, and anything that you want to run half-hourly can be put in cf.main.all.

You'll probably want to change the filenames to something that makes sense in your setting.

        :)

--
Tim Nelson
Server Administrator
WebAlive Technologies Global
Level 1 Innovation Building, Digital Harbour
1010 LaTrobe Street
Docklands, Melbourne, Vic, 3008
Phone: +61 3 9934 0812
Fax: +61 3 9934 0899
E-mail: address@hidden
http://www.webalive.biz/

"Your Business, Your Web, Your Control"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]