]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Introducing $node_hosting_type
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 27 Feb 2010 18:48:35 +0000 (15:48 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 27 Feb 2010 18:48:35 +0000 (15:48 -0300)
manifests/init.pp

index 8301bbaa9de7de794ca0f132efa8194a38f4e622..e22edbbbeea761316c1333e766825414b46deab3 100644 (file)
@@ -181,12 +181,20 @@ class nodo::vserver inherits nodo {
     dohwinfo   => false,
   }
 
-  # Apply munin configuration for this node
-  Munin_node <<| title == $hostname |>>
+  $hosting_type = $node_hosting_type ? {
+    ''      => "direct",
+    default => "$node_hosting_type",
+  }
+
+  if $hosting_type == "direct" {
+    # Apply munin configuration for this node for
+    # directly hosted nodes.
+    Munin_node <<| title == $hostname |>>
+  }
 
-  # We include munin configuration in case the node wasn't defined
-  # by nodo::vserver::instance.
-  if !defined(munin::client) {
+  if $hosting_type == "third-party" {
+    # Apply munin configuration for this node for third-party
+    # hosted nodes.
     munin_node { "$hostname": }
   }