help-cfengine
[Top][All Lists]
Advanced

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

Re: cfengine ideology question


From: Billy Allan
Subject: Re: cfengine ideology question
Date: Thu, 15 Apr 2004 07:16:37 +0100
User-agent: Mutt/1.4.1i

On Thu, Apr 15, 2004 at 08:54:19AM +0200, Mark.Burgess@iu.hio.no wrote:
> The advantage of cfengine actions is their predictable behaviour
> and reproducibility, so it is best to use them if possible. 
> However, cfengine does not make very specialized script writing easy
> and it is therefore necessary to call other scripts within the cfengine
> framework. That allows you to
>  - keep everything in one place
>  - organize the script runs in relation to other config stuff
>  - borrow some of the safety features of cfengine
> 
> Recently "methods" were introduced in cfengine to allow more
> complex behaviours in cfengine scripts, but even with these there
> will be times when your own script is better.

I haven't been following the "methods" stuff - something new to play
with!  :-)

On another note though, I was wondering if it might be useful to be able
to embed small scripts in an arbitory scripting language
(shell/perl/python/whatever) in a conf file and have cfengine call the
interpretor.

Something like :

perl = ( /apps/perl )
sh = ( /bin/sh )

...

scripts:
        solaris.Hr00.Min0_5::
                perl {
                        for ($i = 0; $i < 10; $i++) {
                                print "hello world\n";
                        }
                }

        patch_server.Hr00.Min0_5::
                sh {
                        cd /export/patches/
                        /apps/wget ftp://some.site.com/8_Recommended.zip
                        /apps/unzip -q 8_Recommended.zip
                }




It might help reduce the cruft of little scripts which tend to appear on
machines over time?


Billy.


        





reply via email to

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