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

Re: [et-mgmt-tools] issue with templating and substitution

Matt Hyclak wrote:
On Wed, May 23, 2007 at 12:11:59AM -0400, Jim Wildman enlightened us:
Given the following snippet in default.ks

cat << YUMEND > /etc/yum.repos.d/default.$lbuild.repo
[$lbuild base]
name = $lbuild base repo
baseurl =$lbuild/RPMS.os

[$lbuild updates]
name = $lbuild updates repo
baseurl =$lbuild/RPMS.updates

[$lbuild rpmforge]
name = $lbuild rpmforge repo
baseurl =$lbuild/RPMS.rpmforge

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').


${lbuild} ?

Seems to have solved some of my weird problems with cheetah...


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...


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