help-cfengine
[Top][All Lists]
Advanced

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

Re: editfiles template; multiple edits; setting a class on update


From: Atom Powers
Subject: Re: editfiles template; multiple edits; setting a class on update
Date: Tue, 17 Jan 2006 10:31:35 -0800

ExpandVariables won't work in my case, since lines are added based on
classes. So I don't want variables in there for classes that are not
going to get defined. (unless I use variables for large blocks of
text; and that has it's own problems)

My testing indicates that as long as the file is only modified within
"editfiles" then the behavior I am looking for is already built into
cfengine.

I found that if I use editfiles to AutoCreate, EmptyEntireFilePlease,
InsertFile, DefineClasses; then I can put additional
AppendIfNoSuchLine, DefineClasses in other config files and cfengine
will only define the class if the final result of the edits differs
from the destination. No version tags necessary. But any "copy"
declaration that could modify the file will cause the class to be
defined every time. (Such as copying the template and then using
editfiles to modify it.)

On 1/17/06, Brendan Strejcek <address@hidden> wrote:
> If you are using a new enough cfengine, you can also use ExpandVariables
> in editfiles.
>
>     http://www.cfengine.org/docs/cfengine-Reference.html#index-Templates-362
>
> Best,
> Brendan
>
> --
> Senior System Administrator
> The University of Chicago
> Department of Computer Science
>
> http://www.cs.uchicago.edu/people/brendan
> http://praksys.blogspot.com/
>


--
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--




reply via email to

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