puppetlabs / puppetlabs-apt

Puppet module to help manage Apt
https://forge.puppetlabs.com/puppetlabs/apt
Apache License 2.0
215 stars 462 forks source link

apt_security_updates fact is missing if no other updates available #1061

Open jamesps-ebi opened 2 years ago

jamesps-ebi commented 2 years ago

Describe the Bug

For hosts that have no pending updates (neither security, or other), the 'apt_security_updates' fact is not reported. By comparison, if a host has no pending security updates, but has other updates pending, the 'apt_security_updates' fact is reported with a value of 0

Expected Behavior

The 'apt_security_updates' fact should always be reported, even if there are no updates pending.

Steps to Reproduce

Steps to reproduce the behavior:

  1. From any debian-based host, install all pending updates (security and non-security).
  2. Force check-in with Puppet server
  3. View reported facts on the Puppet server.

Environment