[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Convergence and Include in editfiles
From: |
Andrew Stribblehill |
Subject: |
Re: Convergence and Include in editfiles |
Date: |
Thu, 6 Jun 2002 10:18:17 +0100 |
User-agent: |
Mutt/1.3.28i |
Quoting Adrian Phillips <address@hidden> (2002-06-01 08:11:58 BST):
> >>>>> "Andrew" == Andrew Stribblehill <address@hidden> writes:
>
> Andrew> I think that the folllowing snippet is convergent. Can
> Andrew> anyone convince me otherwise, and preferably show me how
> Andrew> to rewrite it in a convergent manner?
>
> Andrew> editfiles: redhat:: { /etc/sysconfig/network
> Andrew> BeginGroupIfNoSuchLine "HOSTNAME=$(host)" ReplaceAll
> Andrew> "HOSTNAME=.*" With "HOSTNAME=$(host)" EndGroup
> Andrew> DefineClasses "changeHostname" }
>
> Hmm, if you've alrady got BeginGroupIfNoSuchLine "HOSTNAME=$(host)",
> perhaps DeleteLinesMatching "HOSTNAME=.*", then Append
> "HOSTNAME=$(host)" ?
Thanks Adrian. I can now see that it's only convergent in the case
that I had a "HOSTNAME=.*" line in the file, so cfagent had no option
to say that in the general case it wasn't convergent.
> Andrew> The other question is: should the following be okay?
>
> Andrew> editfiles: { /etc/xinetd.d Include 'finger' Include 'rsh'
> Andrew> Include 'rlogin' Include 'rexec' Include 'telnet' Include
> Andrew> 'daytime' HashCommentLinesStarting '$(tab)disable'
> Andrew> DefineClasses 'hupXinetd' }
>
> Andrew> When I run this, I get the following (cfagent -ngq)
> Andrew> output:
>
> Andrew> cfengine:angel: Unknown action in editing of file
> Andrew> /etc/xinetd.d/daytime cfengine:angel: Unknown action in
> Andrew> editing of file /etc/xinetd.d/daytime cfengine:angel:
I'm pretty sure this is a long-standing bug in cfagent from before
the 2.0 days. It was doing this in 1.6 but I didn't feel ready to
report it, since I couldn't test on 2.0 at that point.
--
WEST SOLE
VARIABLE 3 BECOMING NORTHWEST 5 TO 7, PERHAPS GALE 8 LATER. RAIN.
MODERATE