Is there no one how can help me solve my problem?

Regards, Manuel 

-----Ursprüngliche Nachricht-----
Von: cobbler-boun...@lists.fedorahosted.org 
[mailto:cobbler-boun...@lists.fedorahosted.org] Im Auftrag von 
manuel.laes...@swisslife.ch
Gesendet: Montag, 6. August 2012 08:58
An: cobbler@lists.fedorahosted.org
Betreff: Re: [cobbler] Can't read out variable repos in snippet

Hello James 
Thank you very much for your help. I just don't get it done if I only have one 
repo in $repos. With two repos in $repo your script works.

[root@cobbler ~]# cat /var/lib/cobbler/kickstarts/Test.ks 
#for $repo in $repos
 #if $repo.find("rhel5")
Wahoo!!
 #break
 #end if
#end for 

[root@cobbler ~]# cobbler profile dumpvars --name=rhel5-Test  | grep "^repos "
repos : rhel58-x86_64-20120723

[root@cobbler ~]# cobbler profile getks --name=rhel5-Test

[root@cobbler ~]# cobbler profile dumpvars --name=rhel5-Test  | grep "^repos "
repos : rhel63-x86_64-20120723 rhel58-x86_64-20120723

[root@cobbler ~]# cobbler profile getks --name=rhel5-Test
Wahoo!!

[root@ux0502 kickstarts]# 

Thank you very much for your help. Is there a nice documentation for cheetah 
where things like this are explained? I only know Cheetah Users's Guide from 
http://packages.python.org/Cheetah/users_guide/index.html

Regards Manuel

-----Ursprüngliche Nachricht-----
Von: cobbler-boun...@lists.fedorahosted.org 
[mailto:cobbler-boun...@lists.fedorahosted.org] Im Auftrag von James Cammarata
Gesendet: Dienstag, 31. Juli 2012 08:16
An: cobbler mailing list
Betreff: Re: [cobbler] Can't read out variable repos in snippet

On Tue, Jul 31, 2012 at 12:58 AM,  <manuel.laes...@swisslife.ch> wrote:
> Hello James
> Thank you for your answer. Unfortunately this doesn't work. My wget won't be 
> executed even a active repo.
>
> [root@cobbler sl]# cobbler profile dumpvars --name=rhel5-intranet | grep -w 
> repos
> repos : rhel58-x86_64-20120723
> [root@cobbler sl]# cobbler profile getks --name=rhel5-Intranet | grep updates
> repo --name=rhel58-x86_64-20120723 
> --baseurl=http://cobbler/pub/updates/rhel5server-x86_64/20120723
> [root@cobbler sl]#

$ cobbler system dumpvars --name=test | grep "^repos "
repos : passenger-f16-x86_64 openshift-f16-x86_64 fedora-ruby-x86_64

$ cat /var/lib/cobbler/kickstarts/test.ks
#for $repo in $repos
 #if $repo.find("ruby")
Wahoo!!
 #break
 #end if
#end for

$ cobbler system getks --name=test
Wahoo!!
_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler
_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler
_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler

Reply via email to