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
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to