module-apt/manifests/unattended_upgrades.pp
varac a4d788d778 don't call Exec[refresh_apt] after deploying unattended-upgrades config
unattended-upgrades is run on a daily base by cron, no need to force
an `apt-get update` after changing this file.
2015-05-06 22:15:14 +02:00

23 lines
535 B
Puppet

class apt::unattended_upgrades (
$config_content = undef,
$mailonlyonerror = true,
$mail_recipient = 'root',
$blacklisted_packages = [],
$ensure_version = present
) {
package { 'unattended-upgrades':
ensure => $ensure_version
}
$file_content = $config_content ? {
undef => template('apt/50unattended-upgrades.erb'),
default => $config_content
}
apt_conf { '50unattended-upgrades':
content => $file_content,
require => Package['unattended-upgrades'],
refresh_apt => false
}
}