]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Adding yacy routing to vserver
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 7 Jul 2012 13:03:25 +0000 (10:03 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 7 Jul 2012 13:03:25 +0000 (10:03 -0300)
manifests/subsystems/firewall/vserver.pp
manifests/vserver.pp

index fe96c40d92b262e85883e25451bffd687288203e..42622444d221b7d08ffff47e96e409ab5c41c610 100644 (file)
@@ -465,3 +465,15 @@ class firewall::vserver::gobby($destination, $zone = 'fw') {
     order           => '2400',
   }
 }
+
+class firewall::vserver::yacy($destination, $zone = 'fw') {
+  shorewall::rule { 'yacy-0':
+    action          => 'DNAT',
+    source          => 'net',
+    destination     => "$zone:$destination:8090",
+    proto           => 'tcp',
+    destinationport => '8090',
+    ratelimit       => '-',
+    order           => '2500',
+  }
+}
index 02cb1028a9d7db35ed42a3894c965c199d74b218..aa864ed9fcfb01d8ea1f13318f051ea03aea4a87 100644 (file)
@@ -48,7 +48,7 @@ class nodo::vserver inherits nodo {
                   $icecast = false, $sound = false, $tor = false,
                   $ticket = false, $memory_limit = false, $distro = 'squeeze',
                   $dns = false, $munin_port = false, $monkeysphere_ssh_port = false,
-                  $jabber = false, $mumble = false, $gobby = false) {
+                  $jabber = false, $mumble = false, $gobby = false, $yacy = false) {
 
     # set instance id
     if $context <= 9 {
@@ -217,6 +217,12 @@ class nodo::vserver inherits nodo {
             "firewall::vserver::gobby": destination => "192.168.0.$context";
           }
         }
+
+        if $yacy {
+          class {
+            "firewall::vserver::yacy": destination => "192.168.0.$context";
+          }
+        }
       }
     }
   }