Skip to content

Commit

Permalink
fix: limit scope of update-bls-cmdline to RHEL9
Browse files Browse the repository at this point in the history
grub2 on Amazon/Fedora is not compatible
  • Loading branch information
vchepkov committed Aug 20, 2024
1 parent 2f7a6d7 commit 1693099
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/puppet/provider/kernel_parameter/grub2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ def self.mkconfig_cmdline
os = Facter.value(:os)
return false unless os.is_a?(Hash)

return false unless os['family'] == 'RedHat'
return false if os['release']['major'].to_i < 9
return false if os['release']['major'].to_i == 9 && os['release']['minor'].to_i < 3

return false unless os['family'] == 'RedHat' && !['Amazon', 'Fedora'].include?(os['name']) && os['release']['major'].to_i == 9 && os['release']['minor'].to_i >= 3

Check failure on line 42 in lib/puppet/provider/kernel_parameter/grub2.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.

Check failure on line 42 in lib/puppet/provider/kernel_parameter/grub2.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Style/WordArray: Use `%w` or `%W` for an array of words. (https://rubystyle.guide#percent-w)
true
end

Expand Down

0 comments on commit 1693099

Please sign in to comment.