[cobbler] iterating of a list stored in ksmeta

Andrew Hamilton ahamilton55 at gmail.com
Mon Mar 4 08:14:48 UTC 2013


Hi,

On Sat, Mar 2, 2013 at 5:59 PM, Harry Hoffman <hhoffman at ip-solutions.net>wrote:

> Hi All,
>
> I've got a value (actually several) stored in ksmeta for a list of users.


>
Kickstart Metadata: {'users': 'user1,user2,user3', 'rootmail': 'user at fq.dn'}


You'll want to edit the way that the data is stored in the ksmeta field.
For example if your system's name was "system1" you'd do the following:

# cobbler system edit --name system1 --ksmeta='users=user1,user2,user3
root=user at fq.dn'

Then when you do the for loop you'll pull in the correct values.

>
> I'm trying to iterate over the list of users to be able to create users in
> my kickstart file.
>
> I was trying to do something like:
> #for $uname = $users.split(',')
> user --name=$user
> #end for
>

You might have issues here as well since you're assigning the values to
$uname in the for loop but then using the variable $user when attempting to
print out the user.

Andrew

>
> But that doesn't seem to work.
>
> Anyone know how to do this?
>
> Cheers,
> Harry
>
> ______________________________**_________________
> cobbler mailing list
> cobbler at lists.fedorahosted.org
> https://lists.fedorahosted.**org/mailman/listinfo/cobbler<https://lists.fedorahosted.org/mailman/listinfo/cobbler>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/cobbler/attachments/20130304/534872a1/attachment-0001.html>


More information about the cobbler mailing list