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.
This commit is contained in:
parent
207218cee8
commit
c4a0aff2af
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue