+ $frequency_options = ['always','daily','weekly','reluctantly']
+ validate_re($apt_update_frequency, $frequency_options)
+
+ validate_bool($purge_sources_list, $purge_sources_list_d,
+ $purge_preferences, $purge_preferences_d)
+
+ 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'])
+ }
+
+ $_proxy = merge($apt::proxy_defaults, $proxy)
+
+ if $proxy['host'] {
+ apt::setting { 'conf-proxy':
+ priority => '01',
+ content => template('apt/_header.erb', 'apt/proxy.erb'),
+ }
+ }