summaryrefslogtreecommitdiff
path: root/manifests/reboot_required_notify.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/reboot_required_notify.pp')
-rw-r--r--manifests/reboot_required_notify.pp15
1 files changed, 14 insertions, 1 deletions
diff --git a/manifests/reboot_required_notify.pp b/manifests/reboot_required_notify.pp
index d0006f3..82466d2 100644
--- a/manifests/reboot_required_notify.pp
+++ b/manifests/reboot_required_notify.pp
@@ -1,5 +1,18 @@
class apt::reboot_required_notify {
- class { 'apt::reboot_required_notify::wheezy': }
+ $jessie_or_newer = $::operatingsystemmajrelease ? {
+ 5 => false,
+ 6 => false,
+ 7 => false,
+ default => true,
+ }
+
+ if $jessie_or_newer {
+ class { 'apt::reboot_required_notify::jessie': }
+ # Clean up systems that were upgraded from Wheezy or earlier:
+ class { 'apt::reboot_required_notify::wheezy': ensure => absent }
+ } else {
+ class { 'apt::reboot_required_notify::wheezy': }
+ }
}