]> gitweb.fluxo.info Git - puppet-shorewall.git/commitdiff
introduce parametrized class for ports so we can pass the ports from the sshd module
authormh <mh@immerda.ch>
Wed, 20 Oct 2010 22:12:20 +0000 (00:12 +0200)
committermh <mh@immerda.ch>
Wed, 20 Oct 2010 22:12:20 +0000 (00:12 +0200)
manifests/rules/ssh.pp

index f5872596bb6590105012768d2276b0c84c0325a4..0eebcb480f61b07b1a0bf29c4a2af9c0d6d5c90a 100644 (file)
@@ -1,10 +1,11 @@
-class shorewall::rules::ssh {
-    shorewall::rule { 'net-me-tcp_ssh':
-        source          => 'net',
-        destination     => '$FW',
-        proto           => 'tcp',
-        destinationport => 'ssh',
-        order           => 240,
-        action          => 'ACCEPT';
-    }
+class shorewall::rules::ssh($ports) {
+  $flatted_ports = join($ports,',')
+  shorewall::rule { 'net-me-tcp_ssh':
+    source          => 'net',
+    destination     => '$FW',
+    proto           => 'tcp',
+    destinationport => $flatted_ports,
+    order           => 240,
+    action          => 'ACCEPT';
+  }
 }