summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/implementations/shorewall/virtual/munin.pp2
-rw-r--r--manifests/implementations/shorewall/virtual/ssh.pp2
-rw-r--r--manifests/implementations/shorewall/virtual/web.pp2
-rw-r--r--manifests/redirect.pp2
-rw-r--r--manifests/virtual/munin.pp14
-rw-r--r--manifests/virtual/ssh.pp14
-rw-r--r--manifests/virtual/web.pp6
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,
+ }
}
}