help-cfengine
[Top][All Lists]
Advanced

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

RE: Optimizing large copies - modules


From: Martin, Jason H
Subject: RE: Optimizing large copies - modules
Date: Wed, 5 Oct 2005 08:05:52 -0700

At first I thought using a module would be too clunky as copying the
entire repository to every host isn't necessary, but then I realized you
can name your  subdirectories under the repository the same as class
names and have the module compare the allclasses variable to the list of
directories and only copy the ones that match.  That should work pretty
well. 

Is there any way to get output from modules returned via cfexecd? I'd
like the output of rsync to be stored in the logfiles that cfexecd
generates, but cfengine seems to dislike output from modules other then
+ or = lines. I suppose though one could have rsync output redirected to
a logfile and have a shellcommand cat the file. Or, perhaps CFE could be
modified to treat lines beginning with # as comment lines to be passed
through to the output (after stripping the #). That would mean the only
change needed in the module would be to pipe the output of rsync through
sed.

Thank you,
-Jason Martin


> -----Original Message-----
> From: Ed Brown [mailto:ebrown@lanl.gov] 
> Sent: Tuesday, October 04, 2005 4:08 PM
> To: Martin, Jason H
> Cc: help-cfengine@gnu.org
> Subject: RE: Optimizing large copies - actionsequence
> 
> 
> Use a method or module...
> 
> 
> On Tue, 2005-10-04 at 16:59, Martin, Jason H wrote:
> > The problem is that in order to use rsync to download the 
> repository 
> > (see the earlier part of this thread for the overall 
> problem), I need 
> > a few specific shellcommands to run before the copy action and the 
> > rest of the shellcommands. The set of 'prep' shellcommands is much 
> > much smaller than the set of 'later' shellcommands, and it 
> is easier 
> > to manage tagging the smaller set then the larger set.
> > 
> > Thank you,
> > -Jason Martin
> > 
> > > -----Original Message-----
> > > From: Ed Brown [mailto:ebrown@lanl.gov]
> > > Sent: Tuesday, October 04, 2005 3:55 PM
> > > To: Martin, Jason H
> > > Cc: help-cfengine@gnu.org
> > > Subject: RE: Optimizing large copies - actionsequence
> > > 
> > > 
> > > On Tue, 2005-10-04 at 15:35, Martin, Jason H wrote:
> > > 
> > > > How would one set up the actionsequence for this? The
> > > manual indicates
> > > > that I'd put in something like: (
> > > > shellcommands.prepare
> > > > copy
> > > > shellcommands
> > > 
> > > This doesn't work at all in practice (having an unqualified
> > > action AFTER a qualified action in the sequence; see previous 
> > > threads about actionsequence).
> > > 
> > > But you might get some mileage out of:
> > > 
> > > actionsequence = ( shellcommands copy shellcommands.later )
> > > 
> > > Now you only have to qualify the 'later' shellcommands.
> > > 
> > > -Ed
> > > 
> > > 
> 
> 




reply via email to

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