This commit adds two class parameter to apt that can be used to
specify a proxy to use with apt.
- proxy_host
- proxy_port
# class { 'apt': }
class apt(
$disable_keys = false,
- $always_apt_update = false
+ $always_apt_update = false,
+ $proxy_host = false,
+ $proxy_port = '8080'
) {
include apt::params
creates => '/etc/apt/apt.conf.d/99unauth'
}
}
+
+ if($proxy_host) {
+ file { 'configure-apt-proxy':
+ path => '/etc/apt/apt.conf.d/proxy',
+ content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";",
+ }
+ }
}
include apt::params
-
file { "${name}.list":
path => "${apt::params::root}/sources.list.d/${name}.list",
ensure => file,
group => root,
mode => 644,
content => template("apt/source.list.erb"),
+
}
if $pin != false {