]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Switching munin::client to parametrized class
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 25 Jan 2013 17:16:49 +0000 (15:16 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 25 Jan 2013 17:16:49 +0000 (15:16 -0200)
manifests/master.pp
manifests/subsystems/munin.pp

index 28fbdf133f94ce3446a0cac0e816bc33ebe2993f..118e28a2921aec15ddec58e5177107657ce07aa5 100644 (file)
@@ -7,17 +7,6 @@ class nodo::master {
       main => true,
     }
 
-    # This is a workaround to correctly set allowed hosts on munin
-    # client when the host is also present.
-    #
-    # Somewhow the inclusion of munin::host makes both $munin_allow
-    # and $munin_port to get blank.
-    #
-    # Right now we don't need to bother with fixing $munin_port as
-    # we are running the munin host in the main master node but it's
-    # mandatory to fix $munin_allow so munin can connect into the node.
-    $munin_allow = hiera('nodo::munin_node::host',   '')
-
     include munin::host
     include munin::plugins::muninhost
 
index a0a534e214e3cc56b6085b3192015509d5facf55..a0eb7d996dc2fe5d820edee59d51e8372a1e5f93 100644 (file)
@@ -9,10 +9,11 @@ define munin_node(
     '': { fail("Please set nodo::munin_node::allow in your site config") }
   }
 
-  $munin_port  = $port
-  $munin_allow = $allow
-  $munin_host  = $host
+  class { 'munin::client':
+    port  => $port,
+    allow => $allow,
+    host  => $host,
+  }
 
-  include munin::client
   munin::plugin { apt_all: ensure => present; }
 }