Skip to content
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

Use structured facts to detect OS version #136

Merged
merged 2 commits into from
Apr 22, 2022

Conversation

bastelfreak
Copy link
Member

This is at least required for Arch Linux on Facter 4. It doesn't have
the legacy facts operatingsystemmajrelease / operatingsystemrelease.

https://tickets.puppetlabs.com/projects/FACT/issues/FACT-3114

@bastelfreak bastelfreak self-assigned this Apr 22, 2022
@bastelfreak
Copy link
Member Author

Tested at voxpupuli/puppet-letsencrypt#281

@codecov
Copy link

codecov bot commented Apr 22, 2022

Codecov Report

Merging #136 (790eb1b) into master (7e73e37) will decrease coverage by 0.57%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
- Coverage   96.20%   95.62%   -0.58%     
==========================================
  Files           2        2              
  Lines         158      160       +2     
==========================================
+ Hits          152      153       +1     
- Misses          6        7       +1     
Impacted Files Coverage Δ
lib/rspec-puppet-facts.rb 98.70% <100.00%> (-0.64%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e73e37...790eb1b. Read the comment docs.

This is at least required for Arch Linux on Facter 4. It doesn't have
the legacy facts operatingsystemmajrelease / operatingsystemrelease.

https://tickets.puppetlabs.com/projects/FACT/issues/FACT-3114
@bastelfreak
Copy link
Member Author

Instead of refactoring the whole block I decided to only inject one block that uses structured facts. I'm not sure if all factsets have them yet so I think this is the safer approach.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should investigate if the workarounds there are really still needed. They may be outdated by now.

lib/rspec-puppet-facts.rb Outdated Show resolved Hide resolved
Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
@bastelfreak
Copy link
Member Author

restarted voxpupuli/puppet-letsencrypt#281 with your patch

@bastelfreak bastelfreak merged commit b1b69c5 into voxpupuli:master Apr 22, 2022
@bastelfreak bastelfreak deleted the foo branch April 22, 2022 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants