On 07/02/2012 19:36, Lisa Sittler wrote:
> Hi Nicholas,
>
> Thanks for the help.  I have a working promise file now, based on what you 
> and Nick Anderson suggested.
>
> I wasn't able to get the following class definition to work:
>
> "agents" expression =>   and(regcmp( "ag.*", "$(sys.host)" ), 
> not("agent041"), not("agent042"));

Oh, that's because "and" must be on the left hand side (as does "not", 
and takes a list as a parameter.
You could write :
"agents" and => { regcmp( "ag.*", "$(sys.host)" ), "!agent041", 
"!agent042" };

http://www.cfengine.com/manuals/cf3-reference.html#classes-in-common-promises
http://www.cfengine.com/manuals/cf3-reference.html#Class-combination-operators-and-precedence

Regards,
Nicolas
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to