aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-02-02 22:22:47 +0000
committervarac <varacanero@zeromail.org>2016-02-02 22:22:47 +0000
commit6ba1b097c22e1a686e77ce72646e633f869b4ed3 (patch)
tree0e74e81a42221448bb362082b84cdbc7af2bffd0
parent207218cee80ae99845cb567737f14a5eaafc136d (diff)
parentc4a0aff2af47d48ca1b41110274ebb3879c4b758 (diff)
downloadpuppet-apt-6ba1b097c22e1a686e77ce72646e633f869b4ed3.tar.gz
puppet-apt-6ba1b097c22e1a686e77ce72646e633f869b4ed3.tar.bz2
Merge branch 'unatt_upg_logdir' into 'master'
Manage unattended-upgrades log directory In some situations, the log directory for unattended-upgrades might not exist. In those cases, packages will not get upgraded! unattended-upgrades crashes with a python backtrace because the log dir is not present. See merge request !38
-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