help-cfengine
[Top][All Lists]
Advanced

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

Re: cfengine ideology question


From: Mark . Burgess
Subject: Re: cfengine ideology question
Date: Thu, 15 Apr 2004 09:55:03 +0200 (MEST)


On 15 Apr, Billy Allan wrote:
> On Thu, Apr 15, 2004 at 08:54:19AM +0200, address@hidden 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.


Billy, this has been suggested in the past. My objection is that it would
mean that it would break the platform independence of cfengine. i.e. a script 
that
runs on one system (with python) would be broken on another machine that did not
have it. This might be confusing to people, not to mention the technical
issues. 

I understand the suggestion, but I think it is better to keep cfengine
small and cleanly separated.

M

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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