diff options
author | intrigeri <intrigeri@boum.org> | 2016-03-16 14:26:52 +0000 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2016-03-16 14:26:52 +0000 |
commit | e70a6712d31e91ecbf71f4de841735c3b36193ba (patch) | |
tree | 45f5a8272168e898ed36c03287815ab86f6bf6b7 /manifests/reboot_required_notify | |
parent | 46b2f3d2e8c9c8646dfd51280c634ce517d795e6 (diff) |
apt::reboot_required_notify::jessie: manage APT pinning to fetch reboot-notifier from jessie-backports, when running on Jessie.
Diffstat (limited to 'manifests/reboot_required_notify')
-rw-r--r-- | manifests/reboot_required_notify/jessie.pp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/manifests/reboot_required_notify/jessie.pp b/manifests/reboot_required_notify/jessie.pp index 51b75a2..9b5a0c0 100644 --- a/manifests/reboot_required_notify/jessie.pp +++ b/manifests/reboot_required_notify/jessie.pp @@ -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'], } - + } |