summaryrefslogtreecommitdiff
path: root/manifests/unattended_upgrades.pp
blob: b9d19c30bff0d46d3b0420bbb74d21822a0ffbc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class apt::unattended_upgrades {

  package { 'unattended-upgrades':
    ensure  => present,
    require => Exec[refresh_apt]
  }

  apt_conf { '50unattended-upgrades':
    source      => [
                  "puppet:///modules/site_apt/${::lsbdistcodename}/50unattended-upgrades",
                  'puppet:///modules/site_apt/50unattended-upgrades',
                  "puppet:///modules/apt/${::lsbdistcodename}/50unattended-upgrades",
                  'puppet:///modules/apt/50unattended-upgrades' ],
    require     => Package['unattended-upgrades'],
    refresh_apt => false
  }

  Apt_conf['50unattended-upgrades'] {
    notify => undef
  }

  if $apt::custom_preferences != false {
    Apt_conf['50unattended-upgrades'] {
      before => File['apt_config'],
    }
  }
}