summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/base.pp4
-rw-r--r--manifests/init.pp16
2 files changed, 14 insertions, 6 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index 22ef555..23d72e5 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -38,10 +38,10 @@ class shorewall::base {
'STARTUP_ENABLED':
value => $startup_str;
}
- $cfs = keys($shorewall::settings)
+ $cfs = keys($shorewall::merged_settings)
shorewall::config_settings{
$cfs:
- settings => $shorewall::settings;
+ settings => $shorewall::merged_settings;
}
}
diff --git a/manifests/init.pp b/manifests/init.pp
index aac1520..44c703b 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -2,10 +2,7 @@
class shorewall(
$startup = true,
$conf_source = false,
- $settings = {
- 'LOG_MARTIANS' => 'No',
- 'DISABLE_IPV6' => 'Yes',
- },
+ $settings = {},
$ensure_version = 'present',
$tor_transparent_proxy_host = '127.0.0.1',
$tor_transparent_proxy_port = '9040',
@@ -52,6 +49,17 @@ class shorewall(
$daily_check = true,
) {
+ $disable_ipv6 = $ipaddress6 ? {
+ undef => 'Yes',
+ default => 'No',
+ }
+ $def_settings = {
+ 'LOG_MARTIANS' => 'No',
+ 'DISABLE_IPV6' => $disable_ipv6,
+ }
+
+ $merged_settings = merge($def_settings,$settings)
+
case $::operatingsystem {
'Gentoo': { include ::shorewall::gentoo }
'Debian','Ubuntu': { include ::shorewall::debian }