# true, Puppet will purge all unmanaged entries from sources.list
# purge_sources_list_d - Accepts true or false. Defaults to false. If set
# to true, Puppet will purge all unmanaged entries from sources.list.d
+# update_timeout - Overrides the exec timeout in seconds for apt-get update.
+# If not set defaults to Exec's default (300)
#
# Actions:
#
$proxy_port = '8080',
$purge_sources_list = false,
$purge_sources_list_d = false,
- $purge_preferences_d = false
+ $purge_preferences_d = false,
+ $update_timeout = undef
) {
include apt::params
default: { fail('Valid values for disable_keys are true or false') }
}
- if ($proxy_host) {
- file { 'configure-apt-proxy':
- path => "${apt_conf_d}/proxy",
- content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";",
- notify => Exec['apt_update'],
- }
- } else {
- file { 'configure-apt-proxy':
- path => "${apt_conf_d}/proxy",
- ensure => absent,
- notify => Exec['apt_update'],
- }
+ $proxy_set = $proxy_host ? {
+ false => absent,
+ default => present
+ }
+
+ file { 'configure-apt-proxy':
+ ensure => $proxy_set,
+ path => "${apt_conf_d}/proxy",
+ content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";",
+ notify => Exec['apt_update'],
}
# Need anchor to provide containment for dependencies.