On Mon, 27 Apr 2009 14:37:43 +0200, "Ahrens, Jens" <[email protected]> wrote: > Hi everybody, > > I want to pass an array to a kickstart file via ksmeta e.g. > > cobbler add system [...] --ksmeta="NUMBERS=[\'no1\',\'no2\']" [...] > > When I do a dumpvars on the system I get: > .. > 'mgmt_parameters': {'NUMBERS': '['no1','no2']'}, > .. > > That seems to be o.k. > > The kickstart template looks like this: > > #set $NUMBERS = $getVar('$NUMBERS', '') > echo "$NUMBERS -- $NUMBERS[0]" > > The generated kickstart file is: > echo "['no1','no2'] -- [" > > So NUMBERS is interpreted as a literal and not an array. I was expecting: > echo "['no1','no2'] -- no1" > > So my question is how can I get what I expected and make Cheetah > interpret the contents of $NUMBERS as an array and not a literal? > > Thanks and cheers, > Jens
You'll have to use a little python in your #set to do a join($NUMBERS, ' '). -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. _______________________________________________ cobbler mailing list [email protected] https://fedorahosted.org/mailman/listinfo/cobbler
