diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2022-01-25 13:00:48 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2022-01-25 13:00:48 -0300 |
commit | 9bfd1dd20b5cc47a5dd8a5bc8cc3e1e2183e1626 (patch) | |
tree | 17d1ea16114b947768d76a9a9d381bb88999b385 | |
parent | 4d726cb11385bf29e5c99c8c3b4e5579419d7538 (diff) | |
download | puppet-firewall-9bfd1dd20b5cc47a5dd8a5bc8cc3e1e2183e1626.tar.gz puppet-firewall-9bfd1dd20b5cc47a5dd8a5bc8cc3e1e2183e1626.tar.bz2 |
Misc fixes
-rw-r--r-- | manifests/implementations/shorewall/virtual/munin.pp | 2 | ||||
-rw-r--r-- | manifests/implementations/shorewall/virtual/ssh.pp | 2 | ||||
-rw-r--r-- | manifests/implementations/shorewall/virtual/web.pp | 2 | ||||
-rw-r--r-- | manifests/redirect.pp | 2 | ||||
-rw-r--r-- | manifests/virtual/munin.pp | 14 | ||||
-rw-r--r-- | manifests/virtual/ssh.pp | 14 | ||||
-rw-r--r-- | manifests/virtual/web.pp | 6 |
7 files changed, 24 insertions, 18 deletions
diff --git a/manifests/implementations/shorewall/virtual/munin.pp b/manifests/implementations/shorewall/virtual/munin.pp index 79514c6..662d6d5 100644 --- a/manifests/implementations/shorewall/virtual/munin.pp +++ b/manifests/implementations/shorewall/virtual/munin.pp @@ -1,4 +1,4 @@ -define firewall::virtual::munin($destination, $port_orig, $port_dest = '', $order = '400', $zone = 'fw') { +define firewall::implementations::shorewall::virtual::munin($destination, $port_orig, $port_dest = '', $order = '400', $zone = 'fw') { shorewall::rule { "munin-$name-1": action => 'DNAT', source => 'net', diff --git a/manifests/implementations/shorewall/virtual/ssh.pp b/manifests/implementations/shorewall/virtual/ssh.pp index 7ad93fc..d873cd9 100644 --- a/manifests/implementations/shorewall/virtual/ssh.pp +++ b/manifests/implementations/shorewall/virtual/ssh.pp @@ -1,4 +1,4 @@ -define firewall::virtual::ssh($destination, $port_orig = '22', $port_dest = '', $zone = 'vm') { +define firewall::implementations::shorewall::virtual::ssh($destination, $port_orig = '22', $port_dest = '', $zone = 'vm') { shorewall::rule { "ssh-$name-1": action => 'DNAT', source => 'net', diff --git a/manifests/implementations/shorewall/virtual/web.pp b/manifests/implementations/shorewall/virtual/web.pp index 06bf993..13e6831 100644 --- a/manifests/implementations/shorewall/virtual/web.pp +++ b/manifests/implementations/shorewall/virtual/web.pp @@ -1,4 +1,4 @@ -define firewall::virtual::web( +define firewall::implementations::shorewall::virtual::web( $destination ) { shorewall::rule { "web-route-${name}-1": diff --git a/manifests/redirect.pp b/manifests/redirect.pp index de50f86..f6e8ad5 100644 --- a/manifests/redirect.pp +++ b/manifests/redirect.pp @@ -3,6 +3,6 @@ class firewall::redirect::ssh( $destinationport, ) { class { "firewall::implementations::${implementation}::redirect::ssh": - destinationport = $destinationport, + destinationport => $destinationport, } } diff --git a/manifests/virtual/munin.pp b/manifests/virtual/munin.pp index 531acd9..3db8b7e 100644 --- a/manifests/virtual/munin.pp +++ b/manifests/virtual/munin.pp @@ -6,11 +6,13 @@ define firewall::virtual::munin( $zone = 'fw' $implementation = lookup('firewall::implementation', undef, undef, 'shorewall'), ) { - class { "firewall::implementations::${implementation}::virtual::munin": - destination => $destination, - port_orig => $port_orig, - port_dest => $port_dest, - order => $order, - zone => $zone, + if $implementation == 'shorewall' { + firewall::implementations::shorewall::virtual::munin { "${name}": + destination => $destination, + port_orig => $port_orig, + port_dest => $port_dest, + order => $order, + zone => $zone, + } } } diff --git a/manifests/virtual/ssh.pp b/manifests/virtual/ssh.pp index 0a11fa2..98fa976 100644 --- a/manifests/virtual/ssh.pp +++ b/manifests/virtual/ssh.pp @@ -2,13 +2,15 @@ define firewall::virtual::ssh( $destination, $port_orig = '22', $port_dest = '', - $zone = 'vm' + $zone = 'vm', $implementation = lookup('firewall::implementation', undef, undef, 'shorewall'), ) { - class { "firewall::implementations::${implementation}::virtual::ssh": - destination => $destination, - port_orig => $port_orig, - port_dest => $port_dest, - zone => $zone, + if $implementation == 'shorewall' { + firewall::implementations::shorewall::virtual::ssh { "${name}": + destination => $destination, + port_orig => $port_orig, + port_dest => $port_dest, + zone => $zone, + } } } diff --git a/manifests/virtual/web.pp b/manifests/virtual/web.pp index c54a95b..d551d4b 100644 --- a/manifests/virtual/web.pp +++ b/manifests/virtual/web.pp @@ -2,7 +2,9 @@ define firewall::virtual::web( $implementation = lookup('firewall::implementation', undef, undef, 'shorewall'), $destination ) { - class { "firewall::implementations::${implementation}::virtual::web": - destination => $destination, + if $implementation == 'shorewall' { + firewall::implementations::shorewall::virtual::web { "${name}": + destination => $destination, + } } } |