Hashar has uploaded a new change for review.
https://gerrit.wikimedia.org/r/62966
Change subject: proxy_configuration $ipv6_enabled is now boolean
......................................................................
proxy_configuration $ipv6_enabled is now boolean
The $ipv6_enabled parameter of proxy_configuration was a quoted boolean.
This is not recommended by the puppet style guide, instead convert it to
an explicity boolean.
The various callers in protoproxy.pp have been updated as well as the
template which was checking equality with a string "'true'" instead of
boolean value 'true'.
Change-Id: Ib597a8a43674212cebbcf8ccbb916e7861cbf54e
---
M manifests/protoproxy.pp
M templates/nginx/sites/proxy.erb
2 files changed, 20 insertions(+), 20 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/66/62966/1
diff --git a/manifests/protoproxy.pp b/manifests/protoproxy.pp
index 69e39f3..8515449 100644
--- a/manifests/protoproxy.pp
+++ b/manifests/protoproxy.pp
@@ -1,4 +1,4 @@
-define proxy_configuration( $proxy_addresses, $proxy_server_name,
$proxy_server_cert_name, $proxy_backend, $enabled=false,
$proxy_listen_flags='', $proxy_port='80', $ipv6_enabled='false',
$ssl_backend={} ) {
+define proxy_configuration( $proxy_addresses, $proxy_server_name,
$proxy_server_cert_name, $proxy_backend, $enabled=false,
$proxy_listen_flags='', $proxy_port='80', $ipv6_enabled=false, $ssl_backend={}
) {
nginx_site {
"${name}":
@@ -85,7 +85,7 @@
"eqiad" => { "primary" => "10.2.2.25" },
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.200" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
proxy_listen_flags => 'default ssl',
}
@@ -102,7 +102,7 @@
"eqiad" => { "primary" => "10.2.2.23" },
"esams" => { "primary" => "10.2.3.23", "secondary" =>
"208.80.152.210" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
proxy_configuration{ upload:
@@ -118,7 +118,7 @@
"eqiad" => { "primary" => "10.2.2.24" },
"esams" => { "primary" => "10.2.3.24", "secondary" =>
"208.80.152.211" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
proxy_configuration{ wikipedia:
@@ -134,7 +134,7 @@
"eqiad" => { "primary" => "10.2.2.25" },
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.201" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
proxy_configuration{ wiktionary:
@@ -150,7 +150,7 @@
"eqiad" => { "primary" => "10.2.2.25" },
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.202" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
proxy_configuration{ wikiquote:
@@ -166,7 +166,7 @@
"eqiad" => { "primary" => "10.2.2.25" },
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.203" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
proxy_configuration{ wikibooks:
@@ -182,7 +182,7 @@
"eqiad" => { "primary" => "10.2.2.25" },
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.204" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
proxy_configuration{ wikisource:
@@ -198,7 +198,7 @@
"eqiad" => { "primary" => "10.2.2.25" },
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.205" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
proxy_configuration{ wikinews:
@@ -214,7 +214,7 @@
"eqiad" => { "primary" => "10.2.2.25" },
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.206" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
proxy_configuration{ wikiversity:
@@ -230,7 +230,7 @@
"eqiad" => { "primary" => "10.2.2.25" },
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.207" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
proxy_configuration{ mediawiki:
@@ -246,7 +246,7 @@
"eqiad" => { "primary" => "10.2.2.25" },
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.208" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
proxy_configuration{ wikimediafoundation:
@@ -262,7 +262,7 @@
"eqiad" => { "primary" => "10.2.2.25" },
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.209" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
proxy_configuration{ mobilewikipedia:
@@ -278,7 +278,7 @@
"eqiad" => { "primary" => "10.2.2.26" },
"esams" => { "primary" => "10.2.3.26", "secondary" =>
"208.80.154.236" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
# wikidata.org
@@ -296,7 +296,7 @@
"eqiad" => { "primary" => "10.2.2.25" },
# "esams" => { "primary" => "10.2.3.25" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
}
@@ -315,7 +315,7 @@
"eqiad" => { "primary" => "10.2.2.25" },
# "esams" => { "primary" => "10.2.3.25" }
},
- ipv6_enabled => 'true',
+ ipv6_enabled => true,
enabled => true,
}
}
diff --git a/templates/nginx/sites/proxy.erb b/templates/nginx/sites/proxy.erb
index 667c412..9db7c12 100644
--- a/templates/nginx/sites/proxy.erb
+++ b/templates/nginx/sites/proxy.erb
@@ -28,7 +28,7 @@
# SSL proxying
server {
<% proxy_addresses[site].each do |proxy_address| -%>
-<% if proxy_address[0,1] == "[" and !(has_variable?("enable_ipv6_proxy") and
ipv6_enabled == 'true') then
+<% if proxy_address[0,1] == "[" and !(has_variable?("enable_ipv6_proxy") and
ipv6_enabled == true) then
# Skip IPv6 address
next
end -%>
@@ -82,9 +82,9 @@
<% end -%>
}
-<% if has_variable?("enable_ipv6_proxy") and ipv6_enabled == "true" then -%>
-
-# IPv6 proxying
+<% if has_variable?("enable_ipv6_proxy") and ipv6_enabled == true then -%>
+
+# IPv6 proxying
server {
<% proxy_addresses[site].each do |proxy_address| -%>
<% if proxy_address[0].chr != '[' then next end %>
--
To view, visit https://gerrit.wikimedia.org/r/62966
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib597a8a43674212cebbcf8ccbb916e7861cbf54e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits