Andrew Bogott has uploaded a new change for review.
https://gerrit.wikimedia.org/r/77331
Change subject: Make our checks for definitions a bit more explicit.
......................................................................
Make our checks for definitions a bit more explicit.
The previous if $realm syntax might've checked for
definition or might have made a boolean check. Comparing
to undef more clearly expresses what we actually care about.
I've also added explicit :: scope indicators for good measure.
Change-Id: I37b49ae98c28b63698200608d4621ae157c3fbe2
---
M manifests/realm.pp
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/31/77331/1
diff --git a/manifests/realm.pp b/manifests/realm.pp
index 0c36f08..b2d4339 100644
--- a/manifests/realm.pp
+++ b/manifests/realm.pp
@@ -2,15 +2,15 @@
# Collection of global definitions used across sites, within one realm.
#
-if !$::realm {
+if $::realm == undef {
$realm = "production"
}
-if !$instanceproject {
+if $::instanceproject == undef {
$instanceproject = ''
}
-if !$projectgroup {
+if $::projectgroup == undef {
$projectgroup = "project-$instanceproject"
}
@@ -18,9 +18,9 @@
$all_prefixes = [ "208.80.152.0/22", "91.198.174.0/24" ]
# Determine the site the server is in
-if $ipaddress_eth0 {
+if $::ipaddress_eth0 != undef {
$main_ipaddress = $ipaddress_eth0
-} elsif $ipaddress_bond0 {
+} elsif $::ipaddress_bond0 != undef {
$main_ipaddress = $ipaddress_bond0
} else {
$main_ipaddress = $ipaddress
--
To view, visit https://gerrit.wikimedia.org/r/77331
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I37b49ae98c28b63698200608d4621ae157c3fbe2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits