help-cfengine
[Top][All Lists]
Advanced

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

Re: Class definitions - is "_" (underscore) an operator?


From: Ed Brown
Subject: Re: Class definitions - is "_" (underscore) an operator?
Date: Tue, 29 Nov 2005 18:03:27 -0700

(I'm seeing some posts hours after they were posted, so sorry if someone
else has already replied to this.)

The docs say about the 'IPRange(...) function:
True if the current host lies within the specified IP range

So 'customer' and 'customer_location' (a valid classname) are true if
any ip addresses on the current host are in range.

Without seeing the ipaddresses on the host in question, and the range
expressions, it would be hard to say why both classes are being defined.

-Ed


On Tue, 2005-11-29 at 12:17, Jon-Finngard Moe wrote:
> i experience some problems when defining the following classes:
> 
> 
> <snip from cf.customers>
> 
>       customer = (
>               IPRange(somerange/24)
>       )
> 
>       customer_location = (
>               IPRange(anotherrange/24)
>       )
> 
> </snip>
> 
> The actions defined for "customer" works fine.
> 
> But for the "customer_location" cfengine also defines the hosts in 
> "anotherrange" as members of the class 
> "customer" in addition to "customer_location". This again results in cfengine 
> invoking the actions defined for both classes.
> 
> Is this intended behavior? I could not find any documentation that indicates 
> that 
> "_" (underscore) works as an operator which expands for example 
> "customer_location" into two classes. 
> 
> I am using cfengine 2.1.17 on the system. 





reply via email to

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