From 1dc90226ef6b9bc373973d507ba2f52325ddffb6 Mon Sep 17 00:00:00 2001 From: Vratislav Podzimek Date: Tue, 2 Apr 2024 15:13:27 +0200 Subject: [PATCH] Allow disabling recommendations using a CMDB class CMDB classes default to the `data` namespace. So if the user adds `cfengine_recommendations_disabled` as a class in their CMDB data for the hub machine, checking the class in the default namespace is not good enough to disable recommendations. --- controls/def.cf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controls/def.cf b/controls/def.cf index d4c4b61a9..924b0bbbd 100644 --- a/controls/def.cf +++ b/controls/def.cf @@ -667,7 +667,7 @@ bundle common def expression => some( ".+", "def.control_executor_runagent_socket_allow_users" ); "cfengine_recommendations_enabled" - expression => "!cfengine_recommendations_disabled"; + expression => "!cfengine_recommendations_disabled.!data:cfengine_recommendations_disabled"; ### Enable special features policies. Set to "any" to enable.