]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Adding $munin_port and $monkeysphere_ssh_port
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 26 Aug 2011 18:08:32 +0000 (15:08 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 26 Aug 2011 18:08:32 +0000 (15:08 -0300)
manifests/physical.pp
manifests/vserver.pp

index 95f863d0bad159befb2ab3c866e7605c2b08d70a..657c7d20df896bc51d88c380ca1efff1c7cdee87 100644 (file)
@@ -49,7 +49,12 @@ class nodo::physical inherits nodo {
   }
 
   # Monkeysphere configuration
-  monkeysphere_host { "$hostname": }
+  monkeysphere_host { "$hostname":
+    port => $monkeysphere_ssh_port ? {
+      false   => '',
+      default => $monkeysphere_ssh_port,
+    }
+  }
 
   # SMART monitoring
   include munin::plugins::smart
index 2d2ab555a2541a12109ffbd5aa6b05de6b4d51f1..55ed9572f98ac81cff4712319b883b71f29d3834 100644 (file)
@@ -37,7 +37,8 @@ class nodo::vserver inherits nodo {
   define instance($context, $ensure = 'running', $proxy = false,
                   $puppetmaster = false, $gitd = false, $mail = false,
                   $icecast = false, $sound = false, $ticket = false,
-                  $memory_limit = false, $distro = 'squeeze', $dns = false) {
+                  $memory_limit = false, $distro = 'squeeze', $dns = false,
+                  $munin_port = false, $monkeysphere_ssh_port = false) {
 
     # set instance id
     if $context <= 9 {
@@ -81,12 +82,18 @@ class nodo::vserver inherits nodo {
 
     # Create a munin virtual resource to be realized in the node
     @@munin_node { "$name":
-      port => "49$id",
+      port => $munin_port ? {
+        false   => "49$id",
+        default => $munin_port,
+      }
     }
 
     # Create a monkeysphere virtual resource to be realized in the node
     @@monkeysphere_host { "$name":
-      port => "22$id",
+      port => $monkeysphere_ssh_port ? {
+        false   => "22$id",
+        default => $monkeysphere_ssh_port,
+      }
     }
 
     # Sound support