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 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

Reply via email to