apt::reboot_required_notify::jessie: manage APT pinning to fetch reboot-notifier from jessie-backports, when running on Jessie.

This commit is contained in:
intrigeri 2016-03-16 14:26:52 +00:00
parent 46b2f3d2e8
commit e70a6712d3

View file

@ -1,5 +1,15 @@
class apt::reboot_required_notify::jessie ($ensure = present) {
$pinning_ensure = $::operatingsystemmajrelease ? {
8 => present,
default => absent,
}
apt::preferences_snippet { 'reboot-notifier':
ensure => $pinning_ensure,
pin => 'release o=Debian Backports,a=jessie-backports',
priority => 991,
}
# On Jessie and newer, this package installs the script that created
# /var/run/reboot-required*.
# This script (/usr/share/update-notifier/notify-reboot-required) is
@ -7,7 +17,8 @@ class apt::reboot_required_notify::jessie ($ensure = present) {
# This package also sends a daily email to the administrator when a system
# reboot is required, e.g. due to a kernel update.
package { 'reboot-notifier':
ensure => $ensure,
ensure => $ensure,
require => Apt::Preferences_snippet['reboot-notifier'],
}
}