summaryrefslogtreecommitdiff
path: root/manifests/unattended_upgrades.pp
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2016-03-16 14:23:08 +0000
committerintrigeri <intrigeri@boum.org>2016-03-16 14:23:08 +0000
commit46b2f3d2e8c9c8646dfd51280c634ce517d795e6 (patch)
treeca4e9d9448b51b075c4c98f752c7281c636e23cb /manifests/unattended_upgrades.pp
parent3630285006d9fb60c5fbecebc976623c37dd1395 (diff)
parent8c8bd7bb1e5cc0f5297db9629ece783452233d1f (diff)
Merge remote-tracking branch 'shared/master' into bugfix/reboot-required-jessie
Diffstat (limited to 'manifests/unattended_upgrades.pp')
-rw-r--r--manifests/unattended_upgrades.pp13
1 files changed, 12 insertions, 1 deletions
diff --git a/manifests/unattended_upgrades.pp b/manifests/unattended_upgrades.pp
index 6cb0518..52d7542 100644
--- a/manifests/unattended_upgrades.pp
+++ b/manifests/unattended_upgrades.pp
@@ -1,5 +1,6 @@
class apt::unattended_upgrades (
$config_content = undef,
+ $config_template = 'apt/50unattended-upgrades.erb',
$mailonlyonerror = true,
$mail_recipient = 'root',
$blacklisted_packages = [],
@@ -10,8 +11,18 @@ class apt::unattended_upgrades (
ensure => $ensure_version
}
+ # For some reason, this directory is sometimes absent, which causes
+ # unattended-upgrades to crash.
+ file { '/var/log/unattended-upgrades':
+ ensure => directory,
+ owner => 'root',
+ group => 0,
+ mode => '0755',
+ require => Package['unattended-upgrades'],
+ }
+
$file_content = $config_content ? {
- undef => template('apt/50unattended-upgrades.erb'),
+ undef => template($config_template),
default => $config_content
}