I have just started looking 2.0.3 after a few weeks of being busy, and
I have found that snippets which were fine in earlier versions are now
not being expanded. It all goes back to the fact that in the past, as
detailed in the Wiki (which is appearing to be more and more and more
out of date), the behaviour detailed in
https://fedorahosted.org/cobbler/wiki/KickstartTemplating#Escaping
was
If there was no kickstart variable for "elephant", the kickstart
templating engine would leave the string as is ... $elephant
whereas now it is an error and the snippet is not expanded. :(
Add in the fact that sometimes variables are being depricated/removed,
or that for some systems, there is no eth1, etc. This can be a real PITA.
Quoting Benjamin Riggs (riggs(a)umn.edu):
There is a feature in cobbler to display an error message in lieu of
a
parsed kickstart if there is an error in Cheetah's parsing. However,
this code seems to fail when the error occurs in a snippet; instead, the
literal snippet call remains.
On 3/4/2010 2:58 PM, Niels Basjes wrote:
> Hi,
>
> I just solved the exact same problem here.
> On my end it was a $FOO somewhere inside the snippet that needed to
> be escaped.
> Took me a while to find that out because there was no logging on the
> reason the mentioned snippet was not included at all.
>
> HTH
>
> Niels Basjes
>
>
>
> 2010/3/4 Wes Hardin<wes.hardin(a)maxim-ic.com>:
>
>> I'm having an issue with one particular $SNIPPET() not being expanded in
one
>> particular kickstart file with Cobbler 2.0.3.1 on CentOS 5.4.
>>
>> [root@dallcobbler2 repo_mirror]# cat /etc/redhat-release
>> CentOS release 5.4 (Final)
>> [root@dallcobbler2 repo_mirror]# rpm -qa cobbler\*
>> cobbler-web-2.0.3.1-1.el5
>> cobbler-2.0.3.1-1.el5
>>
>> I have a kickstart file for EL4 and EL5. The snippet expands and works
>> correctly in the EL5 kickstart, but when I 'view kickstart' from the
system menu
>> for an EL4 system, I get a literal $SNIPPET() in my kickstart.
>>
>> I looked back at old list posts and saw a post about changes to the Cheetah
>> behavior concerning snippets, and while I admittedly didn't understand it
fully,
>> it doesn't really seem to apply here since it is able to be expanded in one
>> kickstart but not another.
>>
>> There's really very little difference between my EL4 and EL5 kickstarts,
mostly
>> just the %packages and %post. Originally the EL5 didn't have this snippet
in it
>> (the snippet installs yum on RHEL4), so I copied the line from the EL4 and
>> pasted exactly as-is into the EL5 kickstart.
>>
>> Any ideas on what's going on here?
>> --
>> /* Wes Hardin */
>> UNIX System Administrator, IT Engineering Support
>> Maxim Integrated Products: Innovation Delivered
>> _______________________________________________
>> cobbler-devel mailing list
>> cobbler-devel(a)lists.fedorahosted.org
>>
https://fedorahosted.org/mailman/listinfo/cobbler-devel
>>
>>
>
>
>
--
Benjamin Riggs
System Staff
School of Mathematics
University of Minnesota
11 Vincent Hall
612-625-4895
_______________________________________________
cobbler-devel mailing list
cobbler-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler-devel
--
Douglas Wade Needham - KA8ZRT UN*X Consultant & UW/BSD kernel programmer
Email: cinnion @ ka8zrt . com
http://www.ka8zrt.com
Disclaimer: My opinions are my own. Since I don't want them, why
should my employer, or anybody else for that matter!