diff options
author | mh <mh@immerda.ch> | 2017-04-07 15:50:11 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2017-04-07 15:50:11 +0200 |
commit | 89a350feaa3e5f94d104ac7e98af608db659e871 (patch) | |
tree | a7f061e124cf5b1a7af76bd43afa7338b4786817 /manifests/init.pp | |
parent | 59c1cd6c0b9277c07fb577be0f59ce74154352da (diff) |
calculate whether we want to disable ipv6 (if there is no public ipv6 address) or not
Diffstat (limited to 'manifests/init.pp')
-rw-r--r-- | manifests/init.pp | 16 |
1 files changed, 12 insertions, 4 deletions
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 } |