Forum: Cfengine Help Subject: Re: classes Author: Sal Link to topic: https://cfengine.com/forum/read.php?3,19835,19912#msg-19912
I have come up with a different solution for this type of problem. I create a var then declare the class. bundle common prod_host_classes { vars: "prod_web_hosts" string => "www01"; "prod_api_hosts" string => "api.*"; "prod_admin_hosts" slist => { "admin01" , "other_admin.*" }; classes: "prod_web" or => { classmatch("$(prod_web_hosts)") }; "prod_api" or => { classmatch("$(prod_api_hosts)") }; "prod_admin" or => { classmatch("$(prod_admin_hosts)") }; } This works for slist with multiple hosts or keeping it a string using a wild card as in the 3 examples. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine