On 16-Sep-11 04:53, petermity wrote: > "Ronald J. Yacketta"<[email protected]> wrote: > >> Hello all! >> >> I have the following code in a snippet that has been working through >> numerous releases and just noticed today via getks that that variable >> expansion is not happening. >> >> Code: >> >> #set $ver = $getVar('arch', None) >> echo "nrpe $ver setup.." >> #if $ver == "x86_64" >> echo "nrpe ALL=(ALL) NOPASSWD: /usr/lib64/nagios/plugins/">> /etc/sudoers >> #else >> echo "nrpe ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/">> /etc/sudoers >> #end if >> >> When I do a getks or via the generated ks via web I see the code above and >> not the expanded variables. I would expect to see >> >> either >> echo "nrpe ALL=(ALL) NOPASSWD: /usr/lib64/nagios/plugins/">> /etc/sudoers >> or >> echo "nrpe ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/">> /etc/sudoers >> based on $var >> >> I do not get any errors when running getks etc. >> >> CentOS Linux release 6.0 (Final) >> rpm -qa | grep cobbler >> cobbler-web-2.0.11-2.el6.noarch >> cobbler-2.0.11-2.el6.noarch >> >> cobbler profile report --name=SL-61-x86_64 >> Name : SL-61-x86_64 >> Comment : >> DHCP Tag : default >> Distribution : SL-61-x86_64 >> Enable PXE Menu? : True >> Kernel Options : {} >> Kernel Options (Post Install) : {} >> Kickstart : /var/lib/cobbler/kickstarts/sl.ks >> Kickstart Metadata : {} >> Management Classes : [] >> Name Servers : [] >> Name Servers Search Path : [] >> Owners : ['admin'] >> Parent Profile : >> Red Hat Management Key :<<inherit>> >> Red Hat Management Server :<<inherit>> >> Repos : [] >> Server Override :<<inherit>> >> Template Files : {} >> Virt Auto Boot : 1 >> Virt Bridge : br9 >> Virt CPUs : 1 >> Virt File Size(GB) : 15 >> Virt Path : >> Virt RAM (MB) : 512 >> Virt Type : qemu >> >> cobbler distro report --name=SL-61-x86_64 >> Name : SL-61-x86_64 >> Architecture : x86_64 >> Breed : redhat >> Comment : >> Initrd : >> /mnt/iso/SL-61-x86_64/images/pxeboot/initrd.img >> Kernel : /mnt/iso/SL-61-x86_64/images/pxeboot/vmlinuz >> Kernel Options : {} >> Kernel Options (Post Install) : {} >> Kickstart Metadata : {'tree': >> 'http://torque.manage.potsdam.edu/scientific6-64/'} >> Management Classes : [] >> OS Version : generic26 >> Owners : ['admin'] >> Red Hat Management Key :<<inherit>> >> Red Hat Management Server :<<inherit>> >> Template Files : {} >> >> I know expansion does work due the code at the top of my ks working >> >> #set $arch = $getVar('arch', None) >> #set $dist = $getVar('distro', None).split("centos") >> #set $b = $getVar('distro', None).split("-") >> #if $arch == "x86_64" >> #if $b[1] == "61" >> url --url http://137.143.212.2/scientific6.1-64 >> #else >> url --url http://137.143.212.2/scientific$b[1]-64 >> #end if >> #else >> url --url http://137.143.212.2/$b[0]$b[1] >> #end if >> >> cobbler profile getks --name=SL-61-x86_64 | more >> install >> url --url http://137.143.212.2/scientific6.1-64 >> .... >> #set $ver = $getVar('arch', None) >> echo "nrpe $ver setup.." >> #if $ver == "x86_64" >> echo "nrpe ALL=(ALL) NOPASSWD: /usr/lib64/nagios/plugins/">> /etc/sudoers >> #else >> echo "nrpe ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/">> /etc/sudoers >> #end if >> ... >> >> -Ron > Do you have "#raw" anywhere in any of your snippets? If so, are you > ending the raw section via "#end raw" and NOT "#endraw"? > good question, I'll grep around and see wtf > _______________________________________________ > cobbler mailing list > [email protected] > https://fedorahosted.org/mailman/listinfo/cobbler
_______________________________________________ cobbler mailing list [email protected] https://fedorahosted.org/mailman/listinfo/cobbler
