help-cfengine
[Top][All Lists]
Advanced

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

Re: Evaluating a condition and exiting CFEngine


From: christian pearce
Subject: Re: Evaluating a condition and exiting CFEngine
Date: Thu, 23 Feb 2006 09:56:05 -0500

I have a setup where I break my code down into architecture and
content.  The content is all the policy you want to directly manage
your machines.  The architecture is all the bits required to get the
content delivered.  Each bit of content is in a separate file.

so what you can do is something like this

cfagent.conf:

groups:

    condition_exists = ( ChooseYourMethod )

import:

    !condition_exists::
        cf.content

cf.content might look like this:

import:

    cf.policy1
    cf.policy2
    [..etc..]

So in effect cfengine quits if the conition is found.  This happens
because non of the content is imported.  This is a course method, but
it works for me.  I make sure all the binaries I call are avaliable
before I import content.  It they aren't then I send out an alert.


On 2/21/06, David E. Nelson <david.nelson@ni.com> wrote:
> Hi All,
>
> I'm looking for a method/technique which will perform a check (ie. does a file
> exist), and if the check is possitive, have CFEngine exit immediately.
>
> Is this possible?
>
> Thanks,
>          /\/elson
>
>
> --
> ~~ ** ~~ If you don't think too well, then don't think too much. ~~ ** ~~
>
>
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
>


--
Christian Pearce




reply via email to

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