Forum: CFEngine Help
Subject: Define class based on "boolean" var
Author: ZnLMEfuG
Link to topic: https://cfengine.com/forum/read.php?3,26963,26963#msg-26963

I want to define a class based on the value of a "boolean" variable--boolean in 
the sense I'm only interested in the existence or non-existence of one value; 
in this case I've chosen an int with value "0" or "1." Is there a better way or 
preferred idiom rather than something like this snippet of my config?


bundle agent set_user(username, param)
{
  vars:
      "valid" string => "$($(param))";
  classes:
      "valid" expression => isgreaterthan("$(valid)", "0");
}


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

Reply via email to