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:
commit
6ba1b097c2
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