From 78ad20f90ce7fdeddee2a54f04a5680b828de580 Mon Sep 17 00:00:00 2001 From: voreilly Date: Thu, 10 Oct 2024 19:04:25 +1100 Subject: [PATCH 1/2] Update yum_updates.rb Update legacy facts --- lib/facter/yum_updates.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/facter/yum_updates.rb b/lib/facter/yum_updates.rb index 565f3329..9b12257e 100644 --- a/lib/facter/yum_updates.rb +++ b/lib/facter/yum_updates.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true Facter.add('yum_package_updates') do - confine osfamily: 'RedHat' + confine 'os.family': 'RedHat' setcode do yum_updates = [] @@ -18,14 +18,14 @@ end Facter.add('yum_has_updates') do - confine osfamily: 'RedHat' + confine 'os.family': 'RedHat' setcode do Facter.value(:yum_package_updates).any? end end Facter.add('yum_updates') do - confine osfamily: 'RedHat' + confine 'os.family': 'RedHat' setcode do Facter.value(:yum_package_updates).length end From ff3d4b8f4751a10b0d7c35284180d0afe0caa716 Mon Sep 17 00:00:00 2001 From: voreilly Date: Thu, 10 Oct 2024 19:04:58 +1100 Subject: [PATCH 2/2] Update yum_reboot_required.rb Update legacy facts --- lib/facter/yum_reboot_required.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/facter/yum_reboot_required.rb b/lib/facter/yum_reboot_required.rb index 198f99d3..724d8f01 100644 --- a/lib/facter/yum_reboot_required.rb +++ b/lib/facter/yum_reboot_required.rb @@ -3,7 +3,7 @@ require 'English' Facter.add(:yum_reboot_required) do - confine osfamily: 'RedHat' + confine 'os.family': 'RedHat' setcode do if File.exist?('/usr/bin/needs-restarting') Facter::Core::Execution.execute('/usr/bin/needs-restarting --reboothint')