- $always_apt_update = false,
- $disable_keys = undef,
- $proxy_host = false,
- $proxy_port = '8080',
- $purge_sources_list = false,
- $purge_sources_list_d = false,
- $purge_preferences_d = false
-) {
-
- include apt::params
+ $update = {},
+ $purge = {},
+ $proxy = {},
+ $sources = {},
+ $keys = {},
+ $ppas = {},
+ $settings = {},
+) inherits ::apt::params {
+
+ $frequency_options = ['always','daily','weekly','reluctantly']
+ validate_hash($update)
+ if $update['frequency'] {
+ validate_re($update['frequency'], $frequency_options)
+ }
+ if $update['timeout'] {
+ unless is_integer($update['timeout']) {
+ fail('timeout value for update must be an integer')
+ }
+ }
+ if $update['tries'] {
+ unless is_integer($update['tries']) {
+ fail('tries value for update must be an integer')
+ }
+ }
+
+ $_update = merge($::apt::update_defaults, $update)