New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add EL9 support #375
Add EL9 support #375
Conversation
c11e4c4
to
524123e
Compare
lib/puppet/type/openldap_database.rb
Outdated
@@ -56,6 +56,9 @@ | |||
when 'RedHat' | |||
if Facter.value(:operatingsystemmajrelease).to_i <= 6 | |||
'bdb' | |||
# # TODO: Remove legacy fact when drop Puppet 6 support | |||
elsif Facter.value('os.release.major').to_i >= 9 || Facter.value(:operatingsystemmajrelease).to_i >= 9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add the legacy facy here at all? os.release.major is available in Puppet 6 as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried, and it failed. https://github.com/voxpupuli/puppet-openldap/actions/runs/4669511461. I think using Facter.value
to lookup the nested keys was not working for Puppet 6 for whatever reason. That actions all EL9 + Puppet 6 failed before I added the legacy fact back. They all failed because they still tried to use hdb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can do Facter.value('os')['release']['major']
which should work on Puppet 6 and 7.
No description provided.