2013-07-27 19:38:27 +02:00
|
|
|
class apt::unattended_upgrades (
|
|
|
|
$config_content = undef,
|
|
|
|
$mailonlyonerror = true,
|
2013-07-27 19:42:54 +02:00
|
|
|
$mail_recipient = 'root',
|
2015-04-17 22:43:26 +02:00
|
|
|
$blacklisted_packages = [],
|
2015-05-06 21:52:07 +02:00
|
|
|
$ensure_version = present
|
2013-07-27 19:38:27 +02:00
|
|
|
) {
|
2010-12-07 19:18:41 +01:00
|
|
|
|
|
|
|
package { 'unattended-upgrades':
|
2015-05-06 21:52:07 +02:00
|
|
|
ensure => $ensure_version
|
2009-10-30 23:07:12 +01:00
|
|
|
}
|
2009-10-30 20:51:31 +01:00
|
|
|
|
2013-07-27 19:38:27 +02:00
|
|
|
$file_content = $config_content ? {
|
|
|
|
undef => template('apt/50unattended-upgrades.erb'),
|
|
|
|
default => $config_content
|
|
|
|
}
|
|
|
|
|
2013-01-02 14:12:11 +01:00
|
|
|
apt_conf { '50unattended-upgrades':
|
2013-07-27 19:38:27 +02:00
|
|
|
content => $file_content,
|
2010-10-09 13:39:39 +02:00
|
|
|
require => Package['unattended-upgrades'],
|
2013-02-01 11:01:23 +01:00
|
|
|
}
|
2009-10-30 20:35:30 +01:00
|
|
|
}
|