ArielGlenn has submitted this change and it was merged.
Change subject: nginx_site now uses boolean values
......................................................................
nginx_site now uses boolean values
The nginx_site parameters $enable and $install were using quoted boolean
which is not recommended. This patch convert them to boolean defaults
(respectively false and true) and update the parent calls. The
parameters are only used inside of nginx_site call, so no template needs
to be updated.
Also added trailing commas.
Change-Id: Ie70b24f606486ff3789cf7fd47b7faf9f222c708
---
M manifests/generic-definitions.pp
M manifests/protoproxy.pp
2 files changed, 23 insertions(+), 23 deletions(-)
Approvals:
ArielGlenn: Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/generic-definitions.pp b/manifests/generic-definitions.pp
index ae22901..702ba99 100644
--- a/manifests/generic-definitions.pp
+++ b/manifests/generic-definitions.pp
@@ -124,13 +124,13 @@
}
# Enables a certain NGINX site
-define nginx_site($install="false", $template="", $enable="true") {
+define nginx_site($install=false, $template="", $enable=true) {
if ( $template == "" ) {
$template_name = $name
} else {
$template_name = $template
}
- if ( $enable == "true" ) {
+ if ( $enable == true ) {
file { "/etc/nginx/sites-enabled/${name}":
ensure => "/etc/nginx/sites-available/${name}",
}
@@ -141,7 +141,7 @@
}
case $install {
- "true": {
+ true: {
file { "/etc/nginx/sites-available/${name}":
source => "puppet:///files/nginx/sites/${name}";
}
diff --git a/manifests/protoproxy.pp b/manifests/protoproxy.pp
index 4ad62c8..69e39f3 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}":
@@ -67,8 +67,8 @@
nginx_site {
"localhost.conf":
- install => "true",
- enable => "true",
+ install => true,
+ enable => true,
require => Package["nginx"];
}
@@ -86,8 +86,8 @@
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.200" }
},
ipv6_enabled => 'true',
- enabled => 'true',
- proxy_listen_flags => 'default ssl'
+ enabled => true,
+ proxy_listen_flags => 'default ssl',
}
proxy_configuration{ bits:
proxy_addresses => {
@@ -103,7 +103,7 @@
"esams" => { "primary" => "10.2.3.23", "secondary" =>
"208.80.152.210" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
proxy_configuration{ upload:
proxy_addresses => {
@@ -119,7 +119,7 @@
"esams" => { "primary" => "10.2.3.24", "secondary" =>
"208.80.152.211" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
proxy_configuration{ wikipedia:
proxy_addresses => {
@@ -135,7 +135,7 @@
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.201" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
proxy_configuration{ wiktionary:
proxy_addresses => {
@@ -151,7 +151,7 @@
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.202" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
proxy_configuration{ wikiquote:
proxy_addresses => {
@@ -167,7 +167,7 @@
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.203" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
proxy_configuration{ wikibooks:
proxy_addresses => {
@@ -183,7 +183,7 @@
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.204" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
proxy_configuration{ wikisource:
proxy_addresses => {
@@ -199,7 +199,7 @@
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.205" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
proxy_configuration{ wikinews:
proxy_addresses => {
@@ -215,7 +215,7 @@
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.206" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
proxy_configuration{ wikiversity:
proxy_addresses => {
@@ -231,7 +231,7 @@
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.207" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
proxy_configuration{ mediawiki:
proxy_addresses => {
@@ -247,7 +247,7 @@
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.208" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
proxy_configuration{ wikimediafoundation:
proxy_addresses => {
@@ -263,7 +263,7 @@
"esams" => { "primary" => "10.2.3.25", "secondary" =>
"208.80.152.209" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
proxy_configuration{ mobilewikipedia:
proxy_addresses => {
@@ -279,7 +279,7 @@
"esams" => { "primary" => "10.2.3.26", "secondary" =>
"208.80.154.236" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
# wikidata.org
if $::site != "esams" {
@@ -297,7 +297,7 @@
# "esams" => { "primary" => "10.2.3.25" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
}
# wikivoyage.org
@@ -316,7 +316,7 @@
# "esams" => { "primary" => "10.2.3.25" }
},
ipv6_enabled => 'true',
- enabled => 'true'
+ enabled => true,
}
}
# Misc services
@@ -333,7 +333,7 @@
"esams" => { "primary" => "208.80.152.200", "secondary"
=> "208.80.152.200" }
},
ssl_backend => { "esams" => "true" },
- enabled => 'true'
+ enabled => true,
}
}
--
To view, visit https://gerrit.wikimedia.org/r/62583
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie70b24f606486ff3789cf7fd47b7faf9f222c708
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits