]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Adding munin parameter into nodo::subsystem::ups
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 6 Jun 2013 19:30:54 +0000 (16:30 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 6 Jun 2013 19:30:54 +0000 (16:30 -0300)
manifests/subsystem/ups.pp

index 915bc403e9e8962a7b6958b975a5c7c9af63b796..e9a0235b70da21c3585e4a2362a553f65f0673c6 100644 (file)
@@ -7,7 +7,8 @@ class nodo::subsystem::ups(
     $polltime       = hiera('nodo::subsystem::ups::polltime',       '60'),
     $onbatterydelay = hiera('nodo::subsystem::ups::onbatterydelay', '6'),
     $batterylevel   = hiera('nodo::subsystem::ups::batterylevel',   '5'),
-    $minutes        = hiera('nodo::subsystem::ups::minutes',        '3')
+    $minutes        = hiera('nodo::subsystem::ups::minutes',        '3'),
+    $munin          = hiera('nodo::subsystem::ups::munin',          false)
 ) {
   case $include {
     true: {
@@ -24,11 +25,9 @@ class nodo::subsystem::ups(
 
       # Graph local UPS
       munin::plugin { 'apc_nis':
-        ensure => $nisip ? {
-          '127.0.0.1' => present,
-          '0.0.0.0'   => present,
-          'localhost' => present,
-          default     => absent,
+        ensure => $munin ? {
+          true    => present,
+          default => absent,
         }
       }
     }