Don't create svn proxy config if proxy variable is unset
This commit is contained in:
parent
2b9e847b22
commit
769e584977
2 changed files with 7 additions and 8 deletions
|
@ -7,7 +7,10 @@ class svn {
|
|||
}
|
||||
|
||||
file { "/etc/subversion/servers":
|
||||
ensure => present,
|
||||
ensure => $http_proxy ? {
|
||||
"" => absent,
|
||||
default => present,
|
||||
},
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
[global]
|
||||
<%
|
||||
if has_variable?("http_proxy")
|
||||
http_proxy_host, http_proxy_port = http_proxy.split(":")
|
||||
http_proxy_port = "80" if http_proxy_port.nil?
|
||||
http_proxy_host, http_proxy_port = http_proxy.split(":")
|
||||
http_proxy_port = "80" if http_proxy_port.nil?
|
||||
-%>
|
||||
<% end -%>
|
||||
<% if http_proxy_host and http_proxy_port -%>
|
||||
[global]
|
||||
http-proxy-host = <%= http_proxy_host %>
|
||||
http-proxy-port = <%= http_proxy_port %>
|
||||
<% end -%>
|
||||
|
|
Loading…
Add table
Reference in a new issue