Skip to content

Commit

Permalink
Added module to disable recommendations from the MPF
Browse files Browse the repository at this point in the history
Ticket: ENT-11525
Changelog: Title
  • Loading branch information
nickanderson committed Apr 4, 2024
1 parent 23b4a0d commit 09b0a68
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cfbs.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
"subdirectory": "management/autorun-inputs",
"steps": ["json def.json def.json"]
},
"disable-recommendations": {
"description": "Disable all recommendations emitted from the Masterfiles Policy Framework (MPF).",
"subdirectory": "management/disable-recommendations",
"steps": ["json def.json def.json"]
},
"client-initiated-reporting": {
"description": "Enable client initiated reporting and disable pull collection.",
"subdirectory": "reporting/client-initiated-reporting",
Expand Down
20 changes: 20 additions & 0 deletions management/disable-recommendations/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The Masterfiles Policy Framework (MPF) emits recommendations for various settings given the context and role of a host.

For example, when federated reporting is enabled on an Enterprise hub, there is a recommendation to install gnu-parallel.

```
R: CFEngine recommends installing gnu parallel on federated reporting superhubs.
```

These can be useful, but you may want to disable the functionality to quiet your policy runs. This module facilitates disabling all recommendations by defining `default:cfengine_recommendations_disabled`, it is equivalent to editing the augments file (`/var/cfengine/masterfiles/def.json`) to:

```json
{
"classes": {
"default:cfengine_recommendations_disabled": {
"class_expressions": [ "any::" ],
"comment": "We disabled all recommendations emitted by the MPF to quiet policy output."
}
}
}
```
8 changes: 8 additions & 0 deletions management/disable-recommendations/def.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"classes": {
"default:cfengine_recommendations_disabled": {
"class_expressions": [ "any::" ],
"comment": "We disabled all recommendations emitted by the MPF to quiet policy output."
}
}
}

0 comments on commit 09b0a68

Please sign in to comment.