-
Notifications
You must be signed in to change notification settings - Fork 461
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 modern os facts #964
Use modern os facts #964
Conversation
Codecov Report
@@ Coverage Diff @@
## main #964 +/- ##
==========================================
- Coverage 72.24% 71.86% -0.39%
==========================================
Files 5 5
Lines 263 263
==========================================
- Hits 190 189 -1
- Misses 73 74 +1
Continue to review full report at Codecov.
|
dfa2f49
to
00feadf
Compare
I don't see why code coverage would change. 🤷♂️ |
@kenyon I raised https://tickets.puppetlabs.com/browse/FACT-2906 to get lsb packages as dependency added |
e7ff3d0
to
f7d27cb
Compare
🛠️ rebased 🌪️ |
Hi @kenyon, This PR looks great, but can you please squash the commits and then I'll merge it. Thanks |
It's a class, not a defined type. I missed this in puppetlabs#962
Per https://github.com/camptocamp/facterdb/blob/master/facts/3.14/linuxmint-19-x86_64.facts#L324 (assuming LinuxMint 17 used the same capitalization as newer versions).
f7d27cb
to
45341ae
Compare
Thanks. I did some squashing. I think the remaining commits stand on their own. |
Hi @kenyon, Thanks for your contribution, looks great! 👍 |
This turned into a bigger change than I originally imagined...
Background: I'm developing a module using PDK and Litmus. My module has an option to use the backport version of the Debian package. During acceptance testing with the
litmusimage/debian:10
Docker image, I found that a simpleinclude apt::backports
failed becausepuppetlabs-apt
thought it wasn't running on Debian. This turned out to be because thelsb-release
package wasn't installed. I noticed that, with Puppet 7 and Facter 4.0.47 anyway, the legacy OS facts aren't populated unlesslsb-release
is installed. However, the modernos
fact structure is populated even withoutlsb-release
. So rather than have my module ensurelsb-release
is installed, I decided to updatepuppetlabs-apt
, and this pull request is the result.Removing this package dependency makes the module more robust and simpler to use.Update: I see now that only Puppet 7 resolves the
os
fact properly withoutlsb-release
installed, so I've updated this to still install that package for acceptance tests, so that testing on Puppets <7 still works, and updated the readme to note that it's not needed with Puppet 7.I didn't figure out how to stop using
osfamily
in theapt_*
custom facts and theapt_key
provider. Not sure if that is even necessary.There are a few other minor fixes in this PR, in individual commits for easier review.