help-cfengine
[Top][All Lists]
Advanced

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

Re: non-convergent file edit?


From: Eric Sorenson
Subject: Re: non-convergent file edit?
Date: Tue, 16 Mar 2004 15:35:06 -0800 (PST)

On Tue, 16 Mar 2004 rader@ginseng.hep.wisc.edu wrote:

> That said--my apologies in advance for being dense!--but I just
> don't see how...
> 
>  editfiles:
>    { /etc/motd 
>        ReplaceOnce "year is [[:digit:]]{4}" With "year is $(year)" }
> 
> ...could be unpredictable or "add extra things" to /etc/motd.

I think the question is, how would you implement this so that it
is idempotent?  How does cfengine know between invocations that 
"last time" we did it, so "this time" we mustn't?

What should it do if I manually added a line in my motd that said "year is
2004", and then ran cfengine? 

Apologies if my one-note refrain is getting tiresome, but if you want a file's
contents to converge, and not change unless you really mean it, put it in a
'copy:' section from your master server, specify 'type=checksum'  and then
never change the original... Problem solved :-)

-- 

    Eric Sorenson - EXPLOSIVE Networking - http://explosive.net





reply via email to

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