summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2017-04-08 13:52:14 +0200
committermh <mh@immerda.ch>2017-04-08 13:52:14 +0200
commit37a69624f4828079bf7c76f34cf193ab495494a7 (patch)
treeefba66f980b20182794334d5628b8cb84b18af9b
parent063183d10413c9ce5acd8c6f448764b42d6a73d1 (diff)
introduce params for shorewall6, by default it's just a copy of the ones for shorewall
-rw-r--r--manifests/init.pp2
-rw-r--r--manifests/params.pp22
2 files changed, 19 insertions, 5 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index f74466b..d3728e5 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -124,7 +124,7 @@ class shorewall(
'mangle',
]:;
}
- Shorewall::Managed_file['zones','interfaces']{
+ Shorewall::Managed_file['zones','interfaces','params']{
shorewall6 => true,
}
diff --git a/manifests/params.pp b/manifests/params.pp
index 3bc5663..49ced31 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -1,5 +1,19 @@
-define shorewall::params($value, $order='100'){
- shorewall::entry{"params-${order}-${name}":
- line => "${name}=${value}",
- }
+# manage a shorewall param, will be used for both
+# ipv4 and ipv6 if not specified differently using
+# shorewall or shorwall6 booleans.
+# http://www.shorewall.net/manpages/shorewall-params.html
+# http://www.shorewall.net/manpages6/shorewall6-params.html
+define shorewall::params(
+ $value,
+ $key = $name,
+ $order ='100',
+ $shorewall = true,
+ $shorewall6 = true,
+){
+ $with_shorewall6 = $shorewall6 and $shorewall::with_shorewall6
+ shorewall::entry{"params-${order}-${name}":
+ line => "${key}=${value}",
+ shorewall => $shorewall,
+ shorewall6 => $with_shorewall6,
+ }
}