From b42530aba1764e08f25f07013d60d22ef40bd994 Mon Sep 17 00:00:00 2001 From: Victor Moene Date: Thu, 2 Oct 2025 17:25:22 +0200 Subject: [PATCH] Disabled policy versions Changelog: Disabled policy version in masterfiles because it is now managed and inventoried by default by the core agent inside sys.policy_version. Ticket: ENT-4043 Signed-off-by: Victor Moene --- inventory/any.cf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inventory/any.cf b/inventory/any.cf index 8d20ead7b3..e3e0a58b92 100644 --- a/inventory/any.cf +++ b/inventory/any.cf @@ -18,7 +18,10 @@ bundle common inventory_any "policy_version" -> { "ENT-9806" } string => "$(default:control_common.version)", - meta => { "inventory", "attribute_name=CFEngine policy version" }; + meta => { "inventory", "attribute_name=CFEngine policy version" }, + if => not(isvariable("sys.policy_version")), + comment => concat( "Don't inventory the policy version from policy when it's available", + " as a sys var to avoid duplicate values being inventoried."); reports: "DEBUG|DEBUG_$(this.bundle)"::