summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme Charaoui <jcharaoui@cmaisonneuve.qc.ca>2018-05-02 20:28:09 +0000
committerJérôme Charaoui <jcharaoui@cmaisonneuve.qc.ca>2018-05-02 20:28:09 +0000
commitee2affec7a6eacd0ae7b885aa38932ad6a9aebdc (patch)
tree70d8d789dc2cfdc4b2abf8ecb8af5d3db7821b04
parent0bbd20b803b90acc55bd6d52239c11c0e87d2dad (diff)
parentf5b60662a9f68ed559a421aef0bc3912cb7e99d1 (diff)
Merge branch 'libvirt-puppet4' into 'master'
Puppet 4 compatibility. See merge request shared-puppet-modules-group/shorewall!15
-rw-r--r--manifests/rules/libvirt/host.pp19
-rw-r--r--manifests/rules/libvirt/host/from_vmz.pp14
2 files changed, 16 insertions, 17 deletions
diff --git a/manifests/rules/libvirt/host.pp b/manifests/rules/libvirt/host.pp
index dc3970d..090a9ca 100644
--- a/manifests/rules/libvirt/host.pp
+++ b/manifests/rules/libvirt/host.pp
@@ -6,21 +6,6 @@ class shorewall::rules::libvirt::host (
$vmz_iface = 'virbr0',
) {
- define shorewall::rule::accept::from_vmz (
- $proto = '-',
- $destinationport = '-',
- $action = 'ACCEPT'
- ) {
- shorewall::rule { $name:
- source => $shorewall::rules::libvirt::host::vmz,
- destination => '$FW',
- order => 300,
- proto => $proto,
- destinationport => $destinationport,
- action => $action;
- }
- }
-
shorewall::policy {
'fw-to-vmz':
sourcezone => '$FW',
@@ -40,7 +25,7 @@ class shorewall::rules::libvirt::host (
order => 800;
}
- shorewall::rule::accept::from_vmz {
+ shorewall::rules::libvirt::host::from_vmz {
'accept_dns_from_vmz':
action => 'DNS(ACCEPT)';
'accept_tftp_from_vmz':
@@ -62,7 +47,7 @@ class shorewall::rules::libvirt::host (
}
if $debproxy_port {
- shorewall::rule::accept::from_vmz { 'accept_debproxy_from_vmz':
+ shorewall::rules::libvirt::host::from_vmz { 'accept_debproxy_from_vmz':
proto => 'tcp',
destinationport => $debproxy_port,
action => 'ACCEPT';
diff --git a/manifests/rules/libvirt/host/from_vmz.pp b/manifests/rules/libvirt/host/from_vmz.pp
new file mode 100644
index 0000000..f25c333
--- /dev/null
+++ b/manifests/rules/libvirt/host/from_vmz.pp
@@ -0,0 +1,14 @@
+define shorewall::rules::libvirt::host::from_vmz (
+ $proto = '-',
+ $destinationport = '-',
+ $action = 'ACCEPT'
+) {
+ shorewall::rule { $name:
+ source => $shorewall::rules::libvirt::host::vmz,
+ destination => '$FW',
+ order => 300,
+ proto => $proto,
+ destinationport => $destinationport,
+ action => $action;
+ }
+}