- $frequency_options = ['always','daily','weekly','reluctantly']
- validate_re($apt_update_frequency, $frequency_options)
+ 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['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'])
+ }