cfe_internal/CFE_cfengine.cf

Table of Contents

common bodies

cfe_internal_management_file_control

Prototype: cfe_internal_management_file_control

Implementation:

bundle common cfe_internal_management_file_control
{
  vars:

      "inputs" slist => { };

    cfengine_recommendations_enabled::
      "input[cfengine_recommendations]"
        string => "$(this.promise_dirname)/recommendations.cf";

    any::
      "inputs" slist => getvalues( input );
}

agent bundles

cfe_internal_management

Prototype: cfe_internal_management

Implementation:

bundle agent cfe_internal_management
{
  vars:
    any::
      "policy[cfe_internal_core_main]"
        string => "cfe_internal_core_main",
        comment => "Activate policies related to basic CFEngine operations";

    enterprise_edition::
      "policy[cfe_internal_enterprise_main]"
        string => "cfe_internal_enterprise_main",
        comment => "Activate policies related to CFEngine Enterprise operations";

    # TODO: Scope this more tightly to mission portal role
    enterprise_edition.policy_server::
      "policy[cfe_internal_enterprise_mission_portal]"
        string => "Activate policies related to CFEngine Enterprise Mission Portal";

    any::
      "bundles" slist => getindices(policy);

      "recommendation_bundles"
        slist => sort( bundlesmatching( "cfengine_recommendations" ), lex);

  methods:

      #
      # CFEngine internals
      #

      "CFEngine_Internals"
        usebundle => "$(bundles)";

      "CFEngine Recommendations"
        usebundle => $(recommendation_bundles),
        if => isvariable( recommendation_bunldes );

  reports:
    DEBUG|DEBUG_cfe_internal_management::
      "DEBUG $(this.bundle): Should actuate $(bundles)";
}

file bodies

control

Prototype: control

Implementation:

body file control
{
    cfengine_recommendations_enabled::
      inputs => { @(cfe_internal_management_file_control.inputs) };
}