aboutsummaryrefslogtreecommitdiff
path: root/manifests/rules
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-10-21 00:12:20 +0200
committermh <mh@immerda.ch>2010-10-21 00:12:20 +0200
commit079a8e915b73b5a969fa4882eba9fe5c814bf4d9 (patch)
treea39af952401a98157f95fb6e052c86857e804a02 /manifests/rules
parentf9c1086afb6c343fe65e989413acb80cb7d5cb86 (diff)
downloadpuppet-shorewall-079a8e915b73b5a969fa4882eba9fe5c814bf4d9.tar.gz
puppet-shorewall-079a8e915b73b5a969fa4882eba9fe5c814bf4d9.tar.bz2
introduce parametrized class for ports so we can pass the ports from the sshd module
Diffstat (limited to 'manifests/rules')
-rw-r--r--manifests/rules/ssh.pp19
1 files changed, 10 insertions, 9 deletions
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';
+ }
}