aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/unattended_upgrades.pp10
1 files changed, 10 insertions, 0 deletions
diff --git a/manifests/unattended_upgrades.pp b/manifests/unattended_upgrades.pp
index ffb5fad..52d7542 100644
--- a/manifests/unattended_upgrades.pp
+++ b/manifests/unattended_upgrades.pp
@@ -11,6 +11,16 @@ 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($config_template),
default => $config_content