help-cfengine
[Top][All Lists]
Advanced

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

Re: setting class based on file change


From: Mark . Burgess
Subject: Re: setting class based on file change
Date: Wed, 5 Feb 2003 23:08:24 +0100 (MET)


A new feature in 2.0.5 donated to me will handle this -- I have
not yet received documentation for the patch, but watch this
space!

Mark

On  5 Feb, Luke A. Kanies wrote:
> I am currently using rsync to pull files down, with ISconf as the
> framework for deciding what gets pulled down.
> 
> I'm hoping to change that transport to cfengine, but to do so, I need to
> be able to uncouple copying the file from triggering an action based on
> the file changing.
> 
> I know that it's very easy to set cfengine up to copy a file, and to
> perform an action if that file is changed.  The problem then is that you
> have now coupled those actions.  That isn't always a problem, but in my
> case, I'm copying an entire directory of files, and any of those files
> might have a different action associated with them.
> 
> For instance, I'm not currently (although I might soon) maintaining all of
> my config files individually; instead, I maintain a central copy of
> sshd_config and syslogd.conf.  When I update those files in the central
> location, they get automatically copied down using rsync.
> 
> The problem is, those files are part of a larger fileset.  Both of those
> files are maintained on a per-platform basis with a bunch of other files.
> So, my copy statement would look like this:
> 
> control:
>   fileserver = ( myserver.mydomain.com )
>   filesource = ( /var/filesets )
>   platform = ( ExecResult(/some/program) )
>   domain = ( ExecResult(domainname) )
> 
> copy:
>   ${filesource}/${platform}/     dest=/
>                                  type=checksum
>                                  server=${fileserver}
> 
> And this would copy, say, both my syslogd.conf and sshd_config files down,
> but then I want cfengine to restart syslogd if syslogd.conf changes, and
> restart sshd if sshd_config changes.
> 
> I can't think of a way to do this without specifying that each of those
> files gets copied independently, which makes my configs more verbose than
> they need to be, or without creating an external module which maintains an
> external list of files to check and checksums associated with them, which
> is definitely duplication of information (and thus bad).
> 
> Is there a way to decouple these actions?  I'm hoping not to rely on these
> methods eventually, but if I can't provide this kind of decoupling to
> start, it's going to make my migration significantly more difficult.
> 
> This seems to be a bit of a general problem in cfengine; most operations
> are relatively tightly coupled, and changing one thing requires changing a
> bunch of other stuff.
> 
> Thanks,
> Luke
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  Mark.Burgess@iu.hio.no
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~






reply via email to

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