From 37a69624f4828079bf7c76f34cf193ab495494a7 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 8 Apr 2017 13:52:14 +0200 Subject: introduce params for shorewall6, by default it's just a copy of the ones for shorewall --- manifests/init.pp | 2 +- manifests/params.pp | 22 ++++++++++++++++++---- 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, + } } -- cgit v1.2.3