diff options
Diffstat (limited to 'puppet/modules/site_config/manifests/remove_files.pp')
-rw-r--r-- | puppet/modules/site_config/manifests/remove_files.pp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/puppet/modules/site_config/manifests/remove_files.pp b/puppet/modules/site_config/manifests/remove_files.pp index 05a758bb..3f46659c 100644 --- a/puppet/modules/site_config/manifests/remove_files.pp +++ b/puppet/modules/site_config/manifests/remove_files.pp @@ -34,10 +34,13 @@ class site_config::remove_files { } # leax-mx logged to /var/log/leap_mx.log in the past - augeas { 'rm_old_leap_mx_log_destination': - incl => '/etc/check_mk/logwatch.state', - lens => 'Simplelines.lns', - changes => [ "rm /files/etc/check_mk/logwatch.state/*[.=~regexp('.*leap_mx.log.*')]" ], + # we need to use a dumb exec here because file_line doesn't + # allow removing lines that match a regex in the current version + # of stdlib, see https://tickets.puppetlabs.com/browse/MODULES-1903 + exec { 'rm_old_leap_mx_log_destination': + command => "/bin/sed -i '/leap_mx.log/d' /etc/check_mk/logwatch.state", + onlyif => "/bin/grep -qe 'leap_mx.log' /etc/check_mk/logwatch.state" } + } |