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

yum_package_updates fact misinterprets output #180

Closed
vchepkov opened this issue Jun 5, 2020 · 0 comments · Fixed by #181
Closed

yum_package_updates fact misinterprets output #180

vchepkov opened this issue Jun 5, 2020 · 0 comments · Fixed by #181

Comments

@vchepkov
Copy link

vchepkov commented Jun 5, 2020

yum_package_updates fact's code assumes that only first line in output should be ignored, this is not the case when multiple yum plugins are installed (satellite 6).

Here is the output:

# /usr/bin/yum --assumeyes --quiet --cacheonly list updates
Loaded plugins: auto-update-debuginfo, priorities, product-id, subscription-
              : manager, versionlock

Which creates this fact

# facter -p yum_package_updates
[
  ""
]
vchepkov referenced this issue Jun 5, 2020
* Add facts related to upgradable packages

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.

* Add a new yum_reboot_required fact

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.

* Add 'list updates' as a valid task

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant