help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting default variable


From: Paul Krizak
Subject: Re: Setting default variable
Date: Tue, 03 Jan 2006 09:04:13 -0600
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

Couldn't you just use "any" for that?

any::
        var1 = default
        var2 = default
        var3 = default

var1class::
        var1 = new value

var2class::
        var2 = new value

var3class::
        var3 = new value

This would give you "defaults" without having to explicitly state things like "!var1class".

If you want to suppress warnings about overwriting variables, put in something like

AllowRedefinitionOf = ( var1 var2 var3 )

in the control section.


Paul Krizak                         5900 E. Ben White Blvd. MS 625
Advanced Micro Devices              Austin, TX  78741
Linux/Unix Systems Engineering      Phone: (512) 602-8775
Microprocessor Solutions Sector


Zeev Fisher wrote:
Hi All,

I would like to declare default variable and then overwrite it only if some class is true for the host.
Current way that I know to implement it is :

!Classname::

        variable = default

Classname::

        variable = variable_value


This way I need all the time to add to the list of exclude new classes.
What I need is to have default value and only if there's a need to define other value , it will be defined



Thanks a lot
Zeev


------------------------------------------------------------------------



------------------------------------------------------------------------

_______________________________________________
Help-cfengine mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-cfengine





reply via email to

[Prev in Thread] Current Thread [Next in Thread]