summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2015-08-31 19:56:16 +0000
committerintrigeri <intrigeri@boum.org>2015-08-31 19:56:16 +0000
commita82e3ae272c8510b3dc30f499316a7bfb518d330 (patch)
treeea4e5ec74ce8e2f050550811ec0d06462ab82049 /manifests
parente2ea89aa7a5da2d239fe46d036dfc7fa92e56a03 (diff)
reboot_required_notify::wheezy: add an "ensure" parameter, defaulting to "present".
Diffstat (limited to 'manifests')
-rw-r--r--manifests/reboot_required_notify/wheezy.pp5
1 files changed, 3 insertions, 2 deletions
diff --git a/manifests/reboot_required_notify/wheezy.pp b/manifests/reboot_required_notify/wheezy.pp
index 14fdd79..06998ef 100644
--- a/manifests/reboot_required_notify/wheezy.pp
+++ b/manifests/reboot_required_notify/wheezy.pp
@@ -1,17 +1,18 @@
-class apt::reboot_required_notify::wheezy {
+class apt::reboot_required_notify::wheezy ($ensure = present) {
# On Wheezy and older, this package installs the script that created
# /var/run/reboot-required*.
# This script (/usr/share/update-notifier/notify-reboot-required) is
# triggered e.g. by kernel packages.
package { 'update-notifier-common':
- ensure => installed,
+ ensure => $ensure,
}
# cron-apt defaults to run every night at 4 o'clock
# plus some random time <1h.
# so we check if a reboot is required a bit later.
cron { 'apt_reboot_required_notify':
+ ensure => $ensure,
command => 'if [ -f /var/run/reboot-required ]; then echo "Reboot required\n" ; cat /var/run/reboot-required.pkgs ; fi',
user => root,
hour => 5,