help-cfengine
[Top][All Lists]
Advanced

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

Re: Getting $(allclasses) into a shellcommand


From: Ed Brown
Subject: Re: Getting $(allclasses) into a shellcommand
Date: Tue, 20 Jul 2004 18:58:24 -0600

p.s.
        This further blurs the distinction between "variables" and "classes" in
cfengine, already sometimes a hard practical difference to grasp. 
Really it is allowing for multiple lists of defined classes (boolean
variables), instead of one.  Lucky for me perhaps, I don't know enough
about cfengine parsing and implementation, to know how impractical the
suggestion might be!

-Ed



On Tue, 2004-07-20 at 18:40, Ed Brown wrote:
> Mark,
> 
> Having to pass extremely long $(allclasses) strings makes me wonder if
> it is having to convey too much information, simply because it is the
> only convenient way to do that.
> 
> Cfengine's ability to dynamically update $(allclasses) makes me wish I
> could define my own variable[s] that could be dynamically updated.
> 
> Specifically, in the case of 'packages:', since that is where we started
> with this, if I could define $(rpms) (or $(distro_rpms) and
> $(third_party_rpms) and $(uninstall_rpms)...), then add to or subtract
> from these inside of 'packages:', based on the existing tests, package
> management with cfengine would get much easier, and $(allclasses) would
> not get so overloaded.
> 
> Something like the following...
> control:
>       rpms = ( wget:strace ) # Beginning list; for everybody
> packages:
>    WebServer::        
>       httpd  elsedefine=httpd usevariable=rpms
>    
> where 'usevariable=...' is new syntax, and sets the variable to be
> updated.  For a WebServer, $(rpms) is now "wget:strace:httpd".
> 
> (Being able to declare a space-separated string value, that would not be
> iterated over in 'shellcommands:', with hyphens and plus signs, would be
> total icing (passed straight to an install command), but I could work
> with existing rules, and continue to substitute for special chars and
> parse the string in a wrapper script... ) 
> 
> thanks for welcoming ideas,
> Ed
>  
> 
> On Mon, 2004-07-19 at 13:20, Mark.Burgess@iu.hio.no wrote:
> > I am interested in finding a different solution to this problem.
> > Any ideas would be welcome.
> > 
> > M
> > 
> > On 19 Jul, Chip Seraphine wrote:
> > > On Friday 16 July 2004 13:23, Ted Zlatanov wrote:
> > >> On Fri, 16 Jul 2004, tzz@lifelogs.com wrote:
> > >> 
> > >> >> Anyway, I am having issues passing these large lists of classes into 
> > >> >> the 
> > >> >> perl script that does the actual RPM installation.  [snip]
> > >> > Why not put it all in a text file with editfiles:, then parse that
> > >> > with Perl?
> > > 
> > > That was my fallback position, but that doesn't work either.  I get the 
> > > same 
> > > truncation if I try to do this:
> > > 
> > > AppendIfNoSuchLine "$(allclasses)"
> > > 
> > > ...so presumably editfiles and shellcommands use the same size buffer.
> > > 
> > >> Oh, and of course you don't have to use Perl :)
> > > 
> > > Blasphemy!  Of *course* it has to be Perl!!!  :-)
> > >  
> > >> Ted
> > > 
> > 
> > 
> > 
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Work: +47 22453272            Email:  Mark.Burgess@iu.hio.no
> > Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > 
> > 
> > 
> > _______________________________________________
> > Help-cfengine mailing list
> > Help-cfengine@gnu.org
> > http://lists.gnu.org/mailman/listinfo/help-cfengine
> 
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine





reply via email to

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