summaryrefslogtreecommitdiff
path: root/manifests/entry.pp
diff options
context:
space:
mode:
authorkwadronaut <kwadronaut@leap.se>2018-11-09 10:03:32 +0100
committerkwadronaut <kwadronaut@leap.se>2018-11-09 10:03:32 +0100
commit74ebf6e34723573a23bf0e758978fb3969e362f8 (patch)
tree6abed2eb699e572c418d25d9969b2f4b083a83c0 /manifests/entry.pp
parent06e89ed3486916ae12186e46b8ec59c8c7c79142 (diff)
parentcabbf434c1778cb4e8fe2f7f726a012f707cd2a5 (diff)
Merge remote-tracking branch 'shared/master'HEADmaster
Diffstat (limited to 'manifests/entry.pp')
-rw-r--r--manifests/entry.pp29
1 files changed, 21 insertions, 8 deletions
diff --git a/manifests/entry.pp b/manifests/entry.pp
index c8fffc7..b6ce702 100644
--- a/manifests/entry.pp
+++ b/manifests/entry.pp
@@ -1,12 +1,25 @@
+# a core wrapper for all kinds of entries
define shorewall::entry(
- $ensure = present,
- $line
+ $line,
+ $ensure = present,
+ $shorewall = true,
+ $shorewall6 = false,
){
- $parts = split($name,'-')
- concat::fragment{$name:
- ensure => $ensure,
- content => "${line}\n",
- order => $parts[1],
- target => "/etc/shorewall/puppet/${parts[0]}",
+ if $ensure == 'present' {
+ $parts = split($name,'-')
+ if $shorewall {
+ concat::fragment{$name:
+ content => "${line}\n",
+ order => $parts[1],
+ target => "/etc/shorewall/puppet/${parts[0]}",
+ }
+ }
+ if $shorewall6 and $shorewall::with_shorewall6 {
+ concat::fragment{"shorewall6_${name}":
+ content => "${line}\n",
+ order => $parts[1],
+ target => "/etc/shorewall6/puppet/${parts[0]}",
+ }
+ }
}
}