Mark Bergsma has submitted this change and it was merged.

Change subject: Strip the site suffix from the title to retrieve the cluster 
name
......................................................................


Strip the site suffix from the title to retrieve the cluster name

Change-Id: Ic62c1dadd66fab4c7bdd3645118246ccfd217ddd
---
M modules/ganglia_new/manifests/monitor/aggregator/instance.pp
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mark Bergsma: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp 
b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
index 1e9b8c3..73d43b4 100644
--- a/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
+++ b/modules/ganglia_new/manifests/monitor/aggregator/instance.pp
@@ -5,7 +5,7 @@
 
        $aggregator = true
 
-       $cluster = $title
+       $cluster = regsubst($title, '^(.*)_[^_]+$', '\1')
        if has_key($ganglia_new::configuration::clusters[$cluster], 'sites') {
                $sites = 
$ganglia_new::configuration::clusters[$cluster]['sites']
        } else {

-- 
To view, visit https://gerrit.wikimedia.org/r/60855
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic62c1dadd66fab4c7bdd3645118246ccfd217ddd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma <m...@wikimedia.org>
Gerrit-Reviewer: Mark Bergsma <m...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to