aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/unattended_upgrades.pp16
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'],
}
}