Fixed http_proxy handling in apt::repo
This commit is contained in:
parent
bbf8ad0750
commit
0d25368ce7
1 changed files with 8 additions and 2 deletions
|
@ -228,6 +228,12 @@ define apt::repo($source, $dist="", $components="main", $key="", $keyserver="",
|
|||
$source_real = $source
|
||||
}
|
||||
|
||||
if $http_proxy and $use_proxy {
|
||||
$http_proxy_real = $http_proxy
|
||||
} else {
|
||||
$http_proxy_real = ""
|
||||
}
|
||||
|
||||
if $use_source {
|
||||
$content = "deb ${source_real} ${dist_real} ${components}\ndeb-src ${source_real} ${dist_real} ${components}\n"
|
||||
} else {
|
||||
|
@ -254,9 +260,9 @@ define apt::repo($source, $dist="", $components="main", $key="", $keyserver="",
|
|||
}
|
||||
|
||||
exec { "apt-key-add-${key}":
|
||||
environment => $http_proxy ? {
|
||||
environment => $http_proxy_real ? {
|
||||
"" => undef,
|
||||
default => "http_proxy=${http_proxy}",
|
||||
default => "http_proxy=${http_proxy_real}",
|
||||
},
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
command => $command,
|
||||
|
|
Loading…
Add table
Reference in a new issue