From 93ce8e5ec63440dd7ec5586785f24a7609ae48ca Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 5 Jul 2017 14:03:24 +0200 Subject: make ensure a noop for concat::framet, as from puppetlabs-concat 4.0.1 on this is removed and concat purges non-managed fragments --- manifests/entry.pp | 30 ++++++++++++++++-------------- 1 file 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]}", + } } } } -- cgit v1.2.3