[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 <brendan@cs.uchicago.edu> 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--
- editfiles template; multiple edits; setting a class on update, Atom Powers, 2006/01/13
- Re: editfiles template; multiple edits; setting a class on update, Adams, Russell L., 2006/01/13
- Re: editfiles template; multiple edits; setting a class on update, Atom Powers, 2006/01/13
- Re: editfiles template; multiple edits; setting a class on update, Russell Adams, 2006/01/13
- Re: editfiles template; multiple edits; setting a class on update, Atom Powers, 2006/01/14
- Re: editfiles template; multiple edits; setting a class on update, Russell Adams, 2006/01/14
- Re: editfiles template; multiple edits; setting a class on update, Atom Powers, 2006/01/14
- Re: editfiles template; multiple edits; setting a class on update, Brendan Strejcek, 2006/01/17
- Re: editfiles template; multiple edits; setting a class on update, Tim Nelson, 2006/01/24
- Re: editfiles template; multiple edits; setting a class on update, Brendan Strejcek, 2006/01/17
- Re: editfiles template; multiple edits; setting a class on update,
Atom Powers <=