From 8c959b62655c0ae40dcb7b1f675ac64a25c98f36 Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Thu, 20 Aug 2020 19:45:21 +0200 Subject: [PATCH] Cleaned up Mission Portal OS variable (inventory_os.description) on RHEL 5 & 6 Previously: ``` RedHatEnterpriseServer 6.7 ``` Now: ``` Red Hat Enterprise Linux Server 6.7 (Santiago) ``` This is more user friendly, and matches the format on newer systems with os-release. Ticket: ENT-6124 Changelog: Title Signed-off-by: Ole Herman Schumacher Elgesem --- inventory/os.cf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inventory/os.cf b/inventory/os.cf index dc6ac238cc..a2a31e2fff 100644 --- a/inventory/os.cf +++ b/inventory/os.cf @@ -21,6 +21,11 @@ _inventory_lsb_found:: # Hard coded values for exceptions / platforms without os-release: +(redhat_5|redhat_6).redhat_pure:: + "description" string => regex_replace("$(inventory_lsb.description)", " release ", "", "g"), + if => isvariable("inventory_lsb.description"), + meta => { "inventory", "attribute_name=OS", "derived-from=inventory_lsb.description" }; + centos_5:: "description" string => "CentOS Linux 5", # Matches format of os-release on 7+ meta => { "inventory", "attribute_name=OS", "derived-from=centos_5" };