voxpupuli / puppet-unattended_upgrades

Unattended-upgrades for APT
https://forge.puppet.com/puppet/unattended_upgrades
Apache License 2.0
34 stars 75 forks source link

Add missing 'always' value support to periodic parameters (every n-days) #206

Closed Hufschmidt closed 2 years ago

Hufschmidt commented 3 years ago

Pull Request (PR) description

This does not seem to be documented in the /etc/apt.conf.d/10periodic config comments, but according to the implementation of /usr/lib/apt/apt.systemd.daily (which is called by apt-daily.service and apt-daily-upgrade.service) some values also support 'always' in addition to positive integer value. (This affects settings that check an operation is only executed 'every n-days'.)

This Pull Request (PR) fixes the following issues

This change allows 'always' to be used for the following settings that support it and are managed by this module

Without this it is not possible to let the apt-daily.timer and apt-daily-upgrade.timer trigger multiple times a day since /usr/lib/apt/apt.systemd.daily will check its last run timestamp against the value of the above settings and abort.


Sidenote: The following settings also support 'always' but are not managed by this module:

Hufschmidt commented 3 years ago

Good idea, added information to README.md.