[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
variable substitution in editfiles
From: |
Bobby Billingsley |
Subject: |
variable substitution in editfiles |
Date: |
Thu, 4 Sep 2003 00:28:42 +0200 |
User-agent: |
Mutt/1.3.27i |
Hi list :)
I'm having a spot of bother w. cfengine 2.0.7p3 on both tru64 and linux.
It seems that variable substitution isn't happening in Setline and
AppendIfNoLineMatching strings.
I've got a configuration similar to the following example:
cfagent.conf:
import:
cf.mydefs
cf.mysite
control:
actionsequence = ( editfiles )
cf.mydefs:
somehost::
NTPserver = ( 1.2.3.4 )
otherhost::
NTPserver = ( 2.3.4.5 )
cf.mysite:
editfiles:
{ /etc/ntp.conf
SetLine "server ${NTPserver} minpoll 4 maxpoll 7"
AppendIfNoLineMatching "[^#]*server.*${NTPserver}.*"
}
which results in /etc/ntp.conf growing with 1 line per invocation of cfagent.
The added line is the literal string from the SetLine buffer without
substitution. I've tried using ()'s instead of {}'s without any improvement.
As far as I can see from the documentation "Variable substitution is performed
on all strings", so either I'm doing something wrong or else there's a bug
somewhere?
/bobby
-- -- -- -- -- -- -- Bobby Billingsley, General Specialist -- -- -- -- -- -- --
___ .--.- \ | | _
`-,_`--'__/ x./_ | Remember to love while you dare | ASCII ribbon campaign ( )
//-_`--/ //\ \ | remember to live while you do | - against HTML email X
\__/ `---' \__/ | -- Piet Hein | & vcards / \
Lat: 55° 40' 52" N Lon: 12° 32' 56" E
Anyone without a sense of humor is at the mercy of the rest of us :->
- variable substitution in editfiles,
Bobby Billingsley <=