summaryrefslogtreecommitdiff
path: root/manifests/unattended_upgrades.pp
blob: 9f74bbd7edcc6abf37442af63ce6de9bbb973d1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class apt::unattended_upgrades (
  $config_content = undef,
  $mailonlyonerror = true,
  $mail_recipient = 'root',
  $blacklisted_packages = [],
) {

  package { 'unattended-upgrades':
    ensure  => present
  }

  $file_content = $config_content ? {
    undef   => template('apt/50unattended-upgrades.erb'),
    default => $config_content
  }

  apt_conf { '50unattended-upgrades':
    content => $file_content,
    require => Package['unattended-upgrades'],
  }
}