help-cfengine
[Top][All Lists]
Advanced

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

Re: Is this quirky for a simple copy, editfiles operation?


From: Adams, Russell L.
Subject: Re: Is this quirky for a simple copy, editfiles operation?
Date: Tue, 10 May 2005 13:19:48 -0500
User-agent: Mutt/1.4.2.1i

control:

        actionsequence = ( copy.first
                           editfiles.second
                           copy.third
                         )

copy:

        first::

                ......


editfiles:

        second::

                ......


copy:

        third::

                ......


Russell


On Tue, May 10, 2005 at 11:06:30AM -0700, Joel Majka wrote:
> 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
> documentation.
> 
> 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 "127.0.0.1 $(host)"
> 
> or even split it into two lines like:
> 
> myvar = "127.0.0.1 " + $(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.
> 
> Thanks,
> Joel
> 
> _______________________________________________
> Help-cfengine mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-cfengine




reply via email to

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