summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2017-07-05 14:03:24 +0200
committermh <mh@immerda.ch>2017-07-05 14:03:24 +0200
commit93ce8e5ec63440dd7ec5586785f24a7609ae48ca (patch)
treeea21cbba55f21bfdc7426fb950985fde30e73a72
parent49d8591a1d027ee44b839c364dffe4624f264c2b (diff)
make ensure a noop for concat::framet, as from puppetlabs-concat 4.0.1 on this is removed and concat purges non-managed fragments
-rw-r--r--manifests/entry.pp30
1 files changed, 16 insertions, 14 deletions
diff --git a/manifests/entry.pp b/manifests/entry.pp
index a7321f8..ccd3305 100644
--- a/manifests/entry.pp
+++ b/manifests/entry.pp
@@ -5,21 +5,23 @@ define shorewall::entry(
$shorewall6 = false,
$line
){
- $parts = split($name,'-')
- if $shorewall {
- 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:
+ ensure => $ensure,
+ content => "${line}\n",
+ order => $parts[1],
+ target => "/etc/shorewall/puppet/${parts[0]}",
+ }
}
- }
- if $shorewall6 and $shorewall::with_shorewall6 {
- concat::fragment{"shorewall6_${name}":
- ensure => $ensure,
- content => "${line}\n",
- order => $parts[1],
- target => "/etc/shorewall6/puppet/${parts[0]}",
+ if $shorewall6 and $shorewall::with_shorewall6 {
+ concat::fragment{"shorewall6_${name}":
+ ensure => $ensure,
+ content => "${line}\n",
+ order => $parts[1],
+ target => "/etc/shorewall6/puppet/${parts[0]}",
+ }
}
}
}