-
-
Notifications
You must be signed in to change notification settings - Fork 100
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 support for yum facts (similar to the apt ones) #141
Add support for yum facts (similar to the apt ones) #141
Conversation
85fc180
to
4169235
Compare
91fbb88
to
9309458
Compare
|
You might check out the https://forge.puppet.com/albatrossflavour/os_patching module, which already does this sort of thing, but has taken into account the time impact during puppet runs. I would recommend against running yum commands for each facter run. |
7608397
to
3d90c58
Compare
This is a good thing to keep in mind. I don't know if this reaches out to a subscription service, but we've seen Satellite servers get heavily overloaded when using |
We deployed it 6 month ago. We contributed patches to fix it / make it work on the various systems we use… Unfortunately it's still "meh" and we are considering to remove it 😞. |
|
I had a local commit for supporting a "list updates" task that I never pushed. Because of the test failure around the cache and as I suggested in #141 (comment) I added two commits to ensure the repositories are not automatically updated when Puppet runs and to allow refreshing the packages with MCollective / Choria / Bolt. |
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.
This looks good to me, but there were other reviewers I'd like to get an approval from since they voiced concerns.
|
@ekohl sure! There is still the test suite idempotency discussion that is annoying me because I do not understand the intention but I believe it's not testing what it tries… Should we track this in another issue? Once everybody is happy with the changes, I'd like to squash the commits: I refrained to do it recently because it's a bit painful for reviewers to focus on the changes, but the history does not really makes sense right now 😆 |
Add three new facts: - yum_has_updates -- Boolean indicating if updates are available; - yum_package_updates -- Array[String] list of upgradable packages; - yum_updates -- Integer number of upgradable packages. These facts are named in the same way as the ones provided by the puppetlabs-apt module.
Just like the apt_reboot_required fact provided by the puppetlabs-apt module, this fact tells if the systems needs to be rebooted. It relies on the needs-restarting(1) command which is part of yum-utils, already managed by the module.
|
All listed reviewers have approved the change. Let's squash related commits! |
64e03cd
to
62e055a
Compare
This task will run yum without -C, fetching recent data if the repositories are outdated. The output is processed to extract the package name, available version and repository of the update. This information is provided as an array of hashes.
62e055a
to
5abaa60
Compare
Pull Request (PR) description
This PR add a bunch of facts similar to the ones provided by the apt module:
yum_has_updates—Booleanindicating if updates are available;yum_package_updates—Array[String]list of upgradable packages;yum_updates—Integernumber of upgradable packages;yum_reboot_required—Booleanindicating if the systems needs to be rebooted.e.g.
This Pull Request (PR) fixes the following issues
n/a