help-cfengine
[Top][All Lists]
Advanced

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

RE: Inline macros or plugin


From: Mark
Subject: RE: Inline macros or plugin
Date: Mon, 23 Aug 2004 10:47:21 -0700

Chip, thanks for the email...

Unfortunately, both ways won't work. The destination is different.
Also, the second thing won't work because I have several classes that are
true in the same run, so the last class that evaluates to true will
overwrite the variable for all other classes before... 

Thanks,

MARK
> -----Original Message-----
> From: Chip Seraphine [mailto:chip@trdlnk.com] 
> Sent: Monday, August 23, 2004 7:51 AM
> To: Mark; help-cfengine@gnu.org
> Subject: Re: Inline macros or plugin
> 
> 
> On Friday 20 August 2004 14:07, Mark wrote:
> > Hi,
> > 
> > I have a task that I want to call for a bunch of classes 
> that always repeats
> > the same configuration, except for one or two values.
> > Something like:
> > 
> > ....
> > Copy:
> >   case1::
> >     somedir/case1/
> >       dest=/newdir/case1
> > 
> >   case2::
> >     somedir/case2/
> >       dest=/newdir/case2
> > 
> >   case3::
> >     somedir/case3/
> >       dest=/newdir/case3
> > ....
> > 
> > Etc. etc. The actual configuration is much longer, so I 
> have to deal with a
> > lot of redundancy and duplication...
> 
> If the destination names are the same, you can use an 
> iterator.  If it's not, 
> you can marginally improve things by doing this:
> 
> control:
>       case1::  var= ( case1 )
>       case2::  var= (case2 )
>       case2::  var= (case3 )
>       #etc
> 
> copy:
>       /somedir/$(var) dest=/newdir/$(var)
> 
> -- 
> 
> Chip Seraphine
> Unix Administrator
> TradeLink, LLC
> 312-264-2048
> chip@trdlnk.com
> 





reply via email to

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