+ 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)
+ include ::apt::update
+
+ validate_hash($purge)
+ if $purge['sources.list'] {
+ validate_bool($purge['sources.list'])
+ }
+ if $purge['sources.list.d'] {
+ validate_bool($purge['sources.list.d'])
+ }
+ if $purge['preferences'] {
+ validate_bool($purge['preferences'])
+ }
+ if $purge['preferences.d'] {
+ validate_bool($purge['preferences.d'])
+ }
+
+ $_purge = merge($::apt::purge_defaults, $purge)
+
+ validate_hash($proxy)
+ if $proxy['ensure'] {
+ validate_re($proxy['ensure'], ['file', 'present', 'absent'])
+ }
+ if $proxy['host'] {
+ validate_string($proxy['host'])
+ }
+ if $proxy['port'] {
+ unless is_integer($proxy['port']) {
+ fail('$proxy port must be an integer')
+ }
+ }
+ if $proxy['https'] {
+ validate_bool($proxy['https'])
+ }
+
+ $_proxy = merge($apt::proxy_defaults, $proxy)
+
+ validate_hash($sources)
+ validate_hash($keys)
+ validate_hash($settings)
+ validate_hash($ppas)
+ validate_hash($pins)