[Top][All Lists]

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

Is this quirky for a simple copy, editfiles operation?

From: Joel Majka
Subject: Is this quirky for a simple copy, editfiles operation?
Date: 10 May 2005 11:06:30 -0700
User-agent: G2/0.2

I'm assuming it's common to use cfengine to pull master config files
from a source, make host-specific changes, and then put them into
place. I've run into two early quirks that I didn't see addressed in

The first quirk is that I don't see a way to serialize identical
action-types in an actionsequence. For example, how would I put
together a sequence that first would copy files from an NFS mount,
perform an editfiles, and then copy them into their proper location? I
don't see a way to define something like actionsequence=(copy1
editfiles copy2). My ugly workaround is to use two seperate
cfagent.conf files and run them in sequence.

I also couldn't find a way to concatenate variables. For example, I'd
like to InsertLine in my editfiles stanza for the localhost definition
in my /etc/hosts. To do this, I wanted to use the built-in $(host)
variable plus some text like:

InsertLine " $(host)"

or even split it into two lines like:

myvar = " " + $(host)
InsertLine "$(myvar)"

but neither seem to work.

I have a feeling I'm just overlooking the obvious or am not thinking on
the right level since I would imagine this type of operation would be
very common.


reply via email to

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