Nicholas Schuetz wrote:
> So what does the f10-webserver-greensboro ks/template looks like? Is
> there a recommended naming convention? Is it literally one line?
>   


Anyway you want it.

One common thing is:

#set $mylocation = $getVar("location,"unknown")
#if $mylocation == "greensboro"

special stuff

#else $mylocation == "swan-quarter"

different special stuff

#else

something else

#end if


Basically the templates are completely open ended. You could actually 
tell the subprofile to use a /different/ template if you really wanted, 
though this is not neccessary.

Also, in some cases, you can also take advantage of "Advanced snippets" 
to do similar things... they allow you to override snippets based on 
profile or system names:

https://fedorahosted.org/cobbler/wiki/KickstartSnippets

In general, subprofiles are more powerful, though a snippet based 
solution may be easier if you are just replacing certain sections of post.

Or you could use the location variable to decide which snippet to 
include, etc.

--Michael

> On Fri, Feb 27, 2009 at 11:49 AM, Michael DeHaan <[email protected]> wrote:
>   
>> Nicholas Schuetz wrote:
>>     
>>> Hello,
>>>
>>> Can someone please give me a real world example that uses a "Child
>>> Profile"? I'm interested to see what the template would look like for
>>> the child.
>>>
>>>
>>> Regards,
>>>
>>> Nick
>>> _______________________________________________
>>> cobbler mailing list
>>> [email protected]
>>> https://fedorahosted.org/mailman/listinfo/cobbler
>>>
>>>       
>> The template can be exactly the same if you want.
>>
>> Here's a simple example:
>>
>> cobbler profile add --name=f10-webserver --distro=f10-i386
>>
>> cobbler profile add --name=f10-webserver-greensboro
>> --inherit=f10-webserver --ksmeta="location=greensboro"
>>
>> The above example creates a profile called f10-webserver-greensboro that
>> is exactly the same as what's in f10-webserver except that it also adds
>> a variable $location in the kickstart that is not found in the parent.
>>
>> Another example is we could make a version of a profile that had
>> different kernel options, or had more virtual ram.
>>
>> cobbler profile add --name=f10-webserver-greensboro
>> --inherit=f10-webserver-with-more-ram --virt-ram=4096
>>
>> The above profile will stay in sync with "f10-webserver" except for the
>> override on the RAM it requires.
>>
>> I think most folks use this for location information and passing
>> --ksmeta variables, more than anything else, though I would definitely
>> like to hear how people are using this feature now in ways that I might
>> not have expected (which is always good to know)
>>
>> Subprofiles can also be infinitely nested, so you could make
>> "f10-webserver-greensboro-more-ram" if you really wanted, etc.
>>
>> We don't do multiple inheritance because that's just complicated and
>> confusing.
>>
>> --Michael
>>
>>
>>
>>
>> _______________________________________________
>> cobbler mailing list
>> [email protected]
>> https://fedorahosted.org/mailman/listinfo/cobbler
>>
>>     
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://fedorahosted.org/mailman/listinfo/cobbler
>   

_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to