File: CFE_cfengine.cf

package info (click to toggle)
cfengine3 3.24.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,552 kB
  • sloc: ansic: 163,161; sh: 10,296; python: 2,950; makefile: 1,744; lex: 784; yacc: 633; perl: 211; pascal: 157; xml: 21; sed: 13
file content (83 lines) | stat: -rw-r--r-- 2,682 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
##################################################################
#
# DO NOT EDIT THIS FILE. All policy files prefixed with CFE_ are maintained
# by CFEngine and its original state is required for internal operations of
# CFEngine. If the file has been modified CFEngine's upgrades may require
# manual intervention. Contact CFEngine support if additional information
# and/or recommendation is needed.
#
##################################################################
##################################################################
#
# cfe_internal_management
#  - manage internal CFE functionalities (any:: can be modified)
#  - some agent bundles are in CFE_hub_specific.cf
#
##################################################################
bundle common cfe_internal_management_file_control
# @brief Define policy input dependancies
{
  vars:

      "inputs" slist => { };

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

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

body file control
# @brief Include policy input dependancies
{
    cfengine_recommendations_enabled::
      inputs => { @(cfe_internal_management_file_control.inputs) };
}

bundle agent cfe_internal_management
# @brief Actuate the appropriate set(s) of internal management policies
{
  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)";

    cfengine_recommendation_instruct_disablement::
      "Note: All recommendations can be disabled by defining 'default:cfengine_recommendations_disabled'";
}