Giuseppe Lavagetto has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/172974

Change subject: role::cache: make ganglia inclusion optional
......................................................................

role::cache: make ganglia inclusion optional

Change-Id: If984cc6bf71723e4730982825978477d2ae86d6d
Signed-off-by: Giuseppe Lavagetto <[email protected]>
---
M manifests/role/cache.pp
1 file changed, 18 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/74/172974/1

diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index d2c4a9b..3992354 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -54,6 +54,8 @@
     class configuration {
         include lvs::configuration
 
+        $has_ganglia = hiera('has_ganglia', true)
+
         $active_nodes = {
             'production' => {
                 'text' => {
@@ -761,8 +763,9 @@
         # unless they're overridden!
         $backend_weight = 10
 
-        # Ganglia monitoring
-        class { 'varnish::monitoring::ganglia': }
+        if $::role::cache::config::has_ganglia {
+            include varnish::monitoring::ganglia
+        }
     }
 
     # Ancestor class for common resources of 2-layer clusters
@@ -781,8 +784,10 @@
         }
 
         # Ganglia monitoring
-        class { 'varnish::monitoring::ganglia':
-            varnish_instances => [ '', 'frontend' ],
+        if $::role::cache::config::has_ganglia{
+            class { 'varnish::monitoring::ganglia':
+                varnish_instances => [ '', 'frontend' ],
+            }
         }
     }
 
@@ -829,7 +834,9 @@
             varnish_instances => [ '127.0.0.1:80', '127.0.0.1:3128' ],
         }
 
-        include varnish::monitoring::ganglia::vhtcpd
+        if $::role::cache::config::has_ganglia {
+            include varnish::monitoring::ganglia::vhtcpd
+        }
 
         $runtime_params = $::site ? {
             #'esams' => ['prefer_ipv6=on','default_ttl=2592000'],
@@ -998,7 +1005,9 @@
             varnish_instances => [ '127.0.0.1:80', '127.0.0.1:3128' ],
         }
 
-        include varnish::monitoring::ganglia::vhtcpd
+        if $::role::cache::config::has_ganglia {
+            include varnish::monitoring::ganglia::vhtcpd
+        }
 
         case $::realm {
             'production': {
@@ -1257,7 +1266,9 @@
             varnish_instances => [ '127.0.0.1:80', '127.0.0.1:3128' ],
         }
 
-        include varnish::monitoring::ganglia::vhtcpd
+        if $::role::cache::config::has_ganglia {
+            include varnish::monitoring::ganglia::vhtcpd
+        }
 
         case $::realm {
             'production': {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If984cc6bf71723e4730982825978477d2ae86d6d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to