Thanks for your response Orion.  Do you see a downside if this is set
on the profile instead?  So I ended up doing this:

cobbler profile edit ---name=CentOS6.6-x86_64 --ksmeta="swaps=none"

instead of what you mentioned which would be added to the snippet code itself.



On Sat, Jan 24, 2015 at 12:05 PM, Orion Poplawski <[email protected]> wrote:
> On 01/23/2015 07:20 PM, Jagga Soorma wrote:
>>
>> Got this to finally work by updating the profile with
>> --ksmeta="swaps=none".  Looks like this variable has to be set before
>> I can test against it otherwise it breaks the code.  I think this will
>> work for me.
>>
>
> Cheetah is a pain here, I use something like:
>
> #set $swaps = $getVar('swaps', 'none')
>
> for optional variables.
>
>>
>>
>> On Fri, Jan 23, 2015 at 6:03 PM, Jagga Soorma <[email protected]> wrote:
>>>
>>> So looks like I can possibly use ksmeta for this but can't seem to get
>>> it to work.  I added this piece of code to this if statement:
>>>
>>> --
>>> #if $swaps
>>> #set $swapsize=$swaps
>>> #else if $machinetype == 'virtual'
>>> #set $swapsize='4096'
>>> #else if $machinetype == 'physical'
>>> #set $swapsize='20480'
>>> #end if
>>> --
>>>
>>> I am expecting that when --ksmeta="swaps=some#" is defined that my
>>> $swapsize will get set to this number and if it is not defined it will
>>> use the machinetype to decide whether to set 4096 or 20480.  However,
>>> when I introduce the "#if $swaps" statement this breaks the whole code
>>> and I no longer see any partitioning in my kickstart.  I have also
>>> tried "#if $swaps != "none"" but that did not work either.  What am I
>>> missing here?  Any help would be appreciated!
>>>
>>> Thanks.
>>>
>>> On Fri, Jan 23, 2015 at 4:07 PM, Jagga Soorma <[email protected]> wrote:
>>>>
>>>> Hi All,
>>>>
>>>> I am starting to use cobbler to provision servers and there is a use
>>>> case for some servers to tweak the swap size.  I currently do the
>>>> following for the swap size:
>>>>
>>>> --
>>>> #if $machinetype == 'virtual'
>>>> #set $swapsize='4096'
>>>> #else if $machinetype == 'physical'
>>>> #set $swapsize='20480'
>>>> #end if
>>>> --
>>>>
>>>> However, if I want a few physical servers (part of the same profile)
>>>> to bypass this and set more swap size how can I go about implementing
>>>> that?  Any help would be appreciated.
>>>>
>>>> Thanks.
>>
>> _______________________________________________
>> cobbler mailing list
>> [email protected]
>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>>
>
>
> --
> Orion Poplawski
> Technical Manager                     303-415-9701 x222
> NWRA/CoRA Division                    FAX: 303-415-9702
> 3380 Mitchell Lane                  [email protected]
> Boulder, CO 80301              http://www.cora.nwra.com
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://lists.fedorahosted.org/mailman/listinfo/cobbler
_______________________________________________
cobbler mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/cobbler

Reply via email to