Dan, I have three (eventually five) license.dat files, one per policy server. The idea is that each of our environment's runtimes (named IS[sandbox], BNZI[dev integration], Neon2[test], Neon0[test], and Gold[production]) has a dedicated policy server. That way, when I make a change to our policy files, I can roll out that updated set of policy files to one runtime at a time so that I can avoid breaking ALL of our systems at once in case of unanticipated issues. I felt this was easier than somehow trying to use runtime-specific classes (which I do create for other reasons) to restrict policy changes to specific runtimes. We're becoming very strict about change control in our environment, hence the creation of distinct policy servers.
Justin -----Original Message----- From: Daniel V Klein [mailto:d...@lonewolf.com] Sent: Monday, May 24, 2010 11:22 AM To: Justin Lloyd Cc: help-cfengine@cfengine.org Subject: Re: Conditional control_common attribute Justin- Do you really have three separate licenses, or do you just want to distribute policy from three servers? If the latter, the host_licenses_paid is the number of licenses, not the number of suppoorted clients (and so you don't need to have a conditional control parameter :-) And if the former, then you probably ought to have separate policy files. -Dan > Hi all, > > I submitted a ticket to Cfengine Support to find out if there's a way to > conditionally set an attribute in the common control body in > promises.cf, but I thought I'd ask here, too, in case anyone else has > run into this. > > Cfengine Nova has a control_common parameter named host_licenses_paid > (compared to the value in a license file provided by Support). However, > I currently have 3 policy servers on one network (soon to be 5) and each > of the policy servers will support a different number of licensed hosts. > So I would like to figure out how to conditionally set the attribute > based on which policy server a host uses. Logically speaking, for > example: > > # in promises.cf > body common control { > bundlesequence => { ... }; > inputs => { ... }; > > my_policy_server_is_ps1:: > host_licenses_paid => "10"; > > my_policy_server_is_ps2:: > host_licenses_paid => "20"; > > my_policy_server_is_ps3:: > host_licenses_paid => "30"; > } > > Unfortunately, since host_licenses_paid is processed very early on, > there's no opportunity that I can see to define the appropriate class. > What I'm trying to avoid is multiple promises.cf files, but the more I > think about this problem, the more inevitable such a solution seems. > > Anyone have any other thoughts on this? > > Thanks, > Justin > > -- > Justin C. Lloyd > Unix Infrastructure Engineer > DigitalGlobe, An Imaging and Information Company > > > This electronic communication and any attachments may contain confidential an > d proprietary > information of DigitalGlobe, Inc. If you are not the intended recipient, or a > n agent or employee > responsible for delivering this communication to the intended recipient, or i > f you have received > this communication in error, please do not print, copy, retransmit, dissemina > te or > otherwise use the information. Please indicate to the sender that you have re > ceived this > communication in error, and delete the copy you received. DigitalGlobe reserv > es the > right to monitor any electronic communication sent or received by its employe > es, agents > or representatives. > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine This electronic communication and any attachments may contain confidential and proprietary information of DigitalGlobe, Inc. If you are not the intended recipient, or an agent or employee responsible for delivering this communication to the intended recipient, or if you have received this communication in error, please do not print, copy, retransmit, disseminate or otherwise use the information. Please indicate to the sender that you have received this communication in error, and delete the copy you received. DigitalGlobe reserves the right to monitor any electronic communication sent or received by its employees, agents or representatives. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine