Dear Mark and Nicolas, Thank you for your reply. Dashes used to be illegal in class names, but as of 3.0.5p1 that is no longer the case. I found this out yesterday: cf-promise -v listed both "lax-it-web01-prod01" and "lax_it_web01_prod01"; so I tried using the "lax-it-web01-prod01" class and it worked fine!
Nicolas, I really like your rewrite, thank you and well done, sir. It gets rid of the 'expression ="any";' which did not contribute to making my intention clear, and fits well with the idea that roles are senior to hostnames. classes: "webserver" or => {"lax_it_web01_prod01", "lax_it_web02_prod01" }; classes: "nagios" or => {"lax_it_web01_prod01" }; classes: "postgress" or => {"lax_it_db01_prod01" }; classes: "zenoss" or => {"lax_it_db01_prod01" }; classes: "provisioning" or => {"lax_it_admin01_prod01" }; Let's take this a step further. Let's say I want to add a new server. to an existing role. I have a provisioning role that can create new server instances non-interactively (so suitable for automation) with cloud API command line tools. I want cfengine on the provisioning server it to notice there is a server in the role list that has not yet been provisioned, and to provision it. You could not accomplish that with the above class promises. So let's try a list: vars: "server_list" slist => { "lax-it-web01-prod01", "lax-it-web02-prod01", # web02 is the new server "lax-it-db01-prod01", "lax-it-admin01-prod01", } How would cfengine know which servers have already been provisioned and which ones need to be created? (Maybe every time it creates a server, it also touches a file on the local filesystem or makes an entry in a host inventory database. But that's part of what I am trying to figure out, how to implement a host inventory database in Cfengine, or if it's better to interface with an external one.) Just to let you know where I am going with this - the next step would be to say "I should have 2 web servers and 1 db server and 1 admin server, and I don't care about the hostnames" (I don't, actually, I care about the roles and the service.) But I want to work out the provisioning question first before I look at abstracting the host names. Some clouds assign hostnames dynamically. Please let me know your thoughts about handling host/role inventory. Truly, Aleksey _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine