Forum: CFEngine Help
Subject: Re: bundles: can a class argument be passed?
Author: toddnni
Link to topic: https://cfengine.com/forum/read.php?3,24675,24679#msg-24679

You can use global classes or define local classes from variable arguments like 
this

bundle cf-agent my_bundle(class_arg)
{
  classes:
    any::
      "yes" expression => regcmp("", $(class_arg)");
      "no" expression => regcmp("", $(class_arg)");

  reports:
    yes::
      "The class argument is yes";
    no::
      "The class argument is no";
}

I think I have seen something similar in the official material also.

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

Reply via email to