parameterize the apt::proxy_client class
This commit is contained in:
parent
0c2f31b5d5
commit
b528cd0005
2 changed files with 5 additions and 12 deletions
|
@ -1,14 +1,7 @@
|
|||
class apt::proxy_client {
|
||||
|
||||
$real_apt_proxy = $apt_proxy ? {
|
||||
"" => "http://localhost",
|
||||
default => $apt_proxy
|
||||
}
|
||||
|
||||
$real_apt_proxy_port = $apt_proxy_port ? {
|
||||
"" => "3142",
|
||||
default => $apt_proxy_port
|
||||
}
|
||||
class apt::proxy_client(
|
||||
$proxy = 'http://localhost',
|
||||
$port = '3142',
|
||||
){
|
||||
|
||||
apt_conf { "20proxy":
|
||||
content => template("apt/20proxy.erb"),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This file is managed by Puppet
|
||||
// all local modifications will be overwritten
|
||||
|
||||
Acquire::http { Proxy "<%= real_apt_proxy %>:<%= real_apt_proxy_port %>"; };
|
||||
Acquire::http { Proxy "<%= proxy %>:<%= port %>"; };
|
||||
Acquire::HTTP::Proxy::bugs.debian.org "DIRECT";
|
||||
|
|
Loading…
Reference in a new issue