diff options
author | Gabriel Filion <gabster@lelutin.ca> | 2013-07-27 13:38:27 -0400 |
---|---|---|
committer | Gabriel Filion <gabster@lelutin.ca> | 2015-04-17 15:50:36 -0400 |
commit | 9192785c452ce2cfa0f58984d3aebdcaf841113a (patch) | |
tree | 78d302937259e35e62ad1e8169e4ca79670d66bd /manifests | |
parent | bb12a296a001a6b11377385b2dd40d39f6534703 (diff) | |
download | puppet-apt-9192785c452ce2cfa0f58984d3aebdcaf841113a.tar.gz puppet-apt-9192785c452ce2cfa0f58984d3aebdcaf841113a.tar.bz2 |
make it possible to opt out of MailOnlyOnError
This combines all files into one template. It should make maintenance
easier.
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/unattended_upgrades.pp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/manifests/unattended_upgrades.pp b/manifests/unattended_upgrades.pp index 80939e3..b63b483 100644 --- a/manifests/unattended_upgrades.pp +++ b/manifests/unattended_upgrades.pp @@ -1,15 +1,19 @@ -class apt::unattended_upgrades { +class apt::unattended_upgrades ( + $config_content = undef, + $mailonlyonerror = true, +) { package { 'unattended-upgrades': ensure => present } + $file_content = $config_content ? { + undef => template('apt/50unattended-upgrades.erb'), + default => $config_content + } + apt_conf { '50unattended-upgrades': - source => [ - "puppet:///modules/site_apt/${::lsbdistid}/50unattended-upgrades.${::lsbdistcodename}", - "puppet:///modules/site_apt/${::lsbdistid}/50unattended-upgrades", - "puppet:///modules/apt/${::lsbdistid}/50unattended-upgrades.${::lsbdistcodename}", - "puppet:///modules/apt/${::lsbdistid}/50unattended-upgrades" ], + content => $file_content, require => Package['unattended-upgrades'], } } |