From db08c666ac7f4dcf32dfe443f23ca5c7d7fa1275 Mon Sep 17 00:00:00 2001 From: Boa-Lin Lai Date: Thu, 25 Apr 2024 15:17:25 -0700 Subject: [PATCH] expose is rhel 8.8 helper for later migration Summary: new function no callsite yet ``` Differential Revision: D56587816 fbshipit-source-id: be02c025c394b6245e88c706b7af8bc3515ba60f --- itchef/cookbooks/fb_helpers/README.md | 3 +++ itchef/cookbooks/fb_helpers/libraries/node_methods.rb | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/itchef/cookbooks/fb_helpers/README.md b/itchef/cookbooks/fb_helpers/README.md index 45986489..54075f5c 100644 --- a/itchef/cookbooks/fb_helpers/README.md +++ b/itchef/cookbooks/fb_helpers/README.md @@ -129,6 +129,9 @@ your node. * `node.rhel8?` Is Redhat Enterprise Linux 8 +* `node.rhel8_8?` + Is Redhat Enterprise Linux 8.8 + * `node.rhel9?` Is Redhat Enterprise Linux 9 diff --git a/itchef/cookbooks/fb_helpers/libraries/node_methods.rb b/itchef/cookbooks/fb_helpers/libraries/node_methods.rb index c2086258..b7ef7dc9 100644 --- a/itchef/cookbooks/fb_helpers/libraries/node_methods.rb +++ b/itchef/cookbooks/fb_helpers/libraries/node_methods.rb @@ -98,6 +98,10 @@ def rhel8? self.rhel? && self['platform_version'].start_with?('8') end + def rhel8_8? + self.rhel? && self['platform_version'].start_with?('8.8') + end + def rhel9? self.rhel? && self['platform_version'].start_with?('9') end