[et-mgmt-tools] issue with templating and substitution
Michael DeHaan
mdehaan at redhat.com
Wed May 23 20:03:47 UTC 2007
Matt Hyclak wrote:
> On Wed, May 23, 2007 at 12:11:59AM -0400, Jim Wildman enlightened us:
>
>> Given the following snippet in default.ks
>>
>> <-------snip---->
>> cat << YUMEND > /etc/yum.repos.d/default.$lbuild.repo
>> [$lbuild base]
>> name = $lbuild base repo
>> baseurl = http://10.1.1.1/mrepo/$lbuild/RPMS.os
>>
>> [$lbuild updates]
>> name = $lbuild updates repo
>> baseurl = http://10.1.1.1/mrepo/$lbuild/RPMS.updates
>>
>> [$lbuild rpmforge]
>> name = $lbuild rpmforge repo
>> baseurl = http://10.1.1.1/mrepo/$lbuild/RPMS.rpmforge
>> enabled=0
>> YUMEND
>> <-----end------>
>>
>> and a ksmeta for this profile of
>> ks metadata : {'lbuild': 'centos5-i386'}
>>
>> Cobbler will successfully replace every instance of $lbuild with
>> centos5-i386 except the _first_ one (the one in the 'cat' line).
>> ie, the file ends up named 'default..repo'. I've tried $$lbuild (got me
>> the PID of the cobbler sync I think), and \$ (got me nothing), and
>> yum.repos.d/$lbuild.repo (which got me a hidden file named .repo which
>> is why I added the 'default').
>>
>> suggestions??
>>
>>
>
> ${lbuild} ?
>
> Seems to have solved some of my weird problems with cheetah...
>
> Matt
>
>
Sounds like a good topic for the Cobbler Wiki ...
If anyone else is doing anything interesting or has any Cheetah
templating tricks, share up and I'll post them... particularly anything
interesting tricks about includes, both Cheetah #includes and kickstart
%includes...
--Michael
More information about the et-mgmt-tools
mailing list