From 079a8e915b73b5a969fa4882eba9fe5c814bf4d9 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 21 Oct 2010 00:12:20 +0200 Subject: introduce parametrized class for ports so we can pass the ports from the sshd module --- manifests/rules/ssh.pp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'manifests/rules') diff --git a/manifests/rules/ssh.pp b/manifests/rules/ssh.pp index f587259..0eebcb4 100644 --- a/manifests/rules/ssh.pp +++ b/manifests/rules/ssh.pp @@ -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'; + } } -- cgit v1.2.3