summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorb4ldr <github@johnbond.org>2016-02-22 12:52:07 +0000
committerb4ldr <github@johnbond.org>2016-03-31 15:37:53 -0300
commit3a4abe4f98d4c24989a1def59968cb49d1d26268 (patch)
tree6908974fb30b0b99c8d70c1939511f489d43033e /manifests/init.pp
parent1ddfcea4c298cbe6236622020ec440e5e0633341 (diff)
add options support
fix ruby 1.9 hash correct
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp13
1 files changed, 13 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 489db32..7b09d0a 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -18,6 +18,7 @@ class unattended_upgrades (
$upgradeable_packages = {},
$verbose = 0,
$notify_update = false,
+ $options = {},
) inherits ::unattended_upgrades::params {
if $legacy_origin == undef or $origins == undef {
@@ -45,6 +46,12 @@ class unattended_upgrades (
validate_integer($size)
validate_hash($upgradeable_packages)
$_upgradeable_packages = merge($::unattended_upgrades::default_upgradeable_packages, $upgradeable_packages)
+ validate_hash($options)
+ $_options = merge($unattended_upgrades::default_options, $options)
+ validate_bool($_options['force_confdef'])
+ validate_bool($_options['force_confold'])
+ validate_bool($_options['force_confnew'])
+ validate_bool($_options['force_confmiss'])
package { 'unattended-upgrades':
ensure => $package_ensure,
@@ -70,5 +77,11 @@ class unattended_upgrades (
require => Package['unattended-upgrades'],
notify_update => $notify_update,
}
+ apt::conf { 'options':
+ priority => 10,
+ content => template("${module_name}/options.erb"),
+ require => Package['unattended-upgrades'],
+ notify_update => $notify_update,
+ }
}