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
This commit is contained in:
varac 2016-02-02 22:22:47 +00:00
commit 6ba1b097c2

View file

@ -11,6 +11,16 @@ class apt::unattended_upgrades (
ensure => $ensure_version 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 ? { $file_content = $config_content ? {
undef => template($config_template), undef => template($config_template),
default => $config_content default => $config_content