Skip to content

Commit

Permalink
Replace legacy facts
Browse files Browse the repository at this point in the history
Update legacy facts
  • Loading branch information
voreilly authored and bastelfreak committed Dec 12, 2024
1 parent 3080021 commit 6989463
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/facter/yum_reboot_required.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
6 changes: 3 additions & 3 deletions lib/facter/yum_updates.rb
Original file line number Diff line number Diff line change
@@ -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 = []

Expand All @@ -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
Expand Down

0 comments on commit 6989463

Please sign in to comment.