file bodies

control

Prototype: control

Description: Include policy input dependancies

Implementation:

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

common bodies

cfe_internal_management_file_control

Prototype: cfe_internal_management_file_control

Description: Define policy input dependancies

Implementation:

code
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

Description: Actuate the appropriate set(s) of internal management policies

Implementation:

code
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_recommends" ), lex);

  methods:

      #
      # CFEngine internals
      #

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

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

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