1 # Class: apt::unattended_upgrades
3 # This class manages the unattended-upgrades package and related configuration
6 # origins are the repositories to automatically upgrade included packages
7 # blacklist is a list of packages to not automatically upgrade
8 # update is how often to run "apt-get update" in days
9 # download is how often to run "apt-get upgrade --download-only" in days
10 # upgrade is how often to upgrade packages included in the origins list in days
11 # autoclean is how often to run "apt-get autoclean" in days
13 # information on the other options can be found in the 50unattended-upgrades
14 # file and in /etc/cron.daily/apt
16 class apt::unattended_upgrades (
17 $origins = $::apt::params::origins,
24 $minimal_steps = false,
25 $install_on_shutdown = false,
27 $mail_only_on_error = false,
28 $remove_unused = true,
33 $backup_interval = '0',
38 $download_delta = '0',
40 ) inherits ::apt::params {
50 validate_array($origins)
53 unless is_numeric($randomsleep) {
54 fail('randomsleep must be numeric')
58 package { 'unattended-upgrades':
62 file { '/etc/apt/apt.conf.d/50unattended-upgrades':
67 content => template('apt/_header.erb', 'apt/50unattended-upgrades.erb'),
68 require => Package['unattended-upgrades'],
71 file { '/etc/apt/apt.conf.d/10periodic':
76 content => template('apt/_header.erb', 'apt/10periodic.erb'),
77 require => Package['unattended-upgrades'],