]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Trying to fix munin definitions
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 18 Feb 2010 02:16:58 +0000 (00:16 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 18 Feb 2010 02:16:58 +0000 (00:16 -0200)
.gitignore [new file with mode: 0644]
manifests/init.pp
manifests/munin.pp [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..1377554
--- /dev/null
@@ -0,0 +1 @@
+*.swp
index 15bbf90f7697e46566ed79156758160d15480491..9820b10f253c185626816cd17daf1a0922e779a8 100644 (file)
@@ -27,7 +27,7 @@ class nodo {
 
   # We include munin configuration if it's not defined by
   # and exported resource.
-  if !defined(Nodo::vserver::munin[$hostname]) {
+  if !defined(Munin[$hostname]) {
     include munin::client
   }
 
@@ -185,14 +185,8 @@ class nodo::vserver inherits nodo {
     dohwinfo   => false,
   }
 
-  define munin($type, $id) {
-    # Use one port for each node
-    $munin_port = "59$id"
-    include munin::client
-  }
-
   # Apply munin configuration for this node
-  Nodo::vserver::munin <| tag == $name |>
+  Munin <| tag == $name |>
 
   # Define a vserver instance
   define instance($context, $ensure = 'running', $proxy = false, $puppetmaster = false, $gitd = false,
@@ -227,7 +221,7 @@ class nodo::vserver inherits nodo {
     }
 
     # Create a munin virtual resource to be realized in the node
-    @nodo::vserver::munin {
+    @munin {
       id   => $id,
       tag  => $name,
     }
diff --git a/manifests/munin.pp b/manifests/munin.pp
new file mode 100644 (file)
index 0000000..461a863
--- /dev/null
@@ -0,0 +1,6 @@
+# Define a munin node with custom port
+define munin($type, $id) {
+  # Use one port for each node
+  $munin_port = "59$id"
+  include munin::client
+}