From 26f7665f556570e4bbd446d7b2046854642aff58 Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 26 May 2015 12:22:29 +0200 Subject: check_mk complains about non-existing logfile (#6964) Change-Id: Ic58f9516854f812d46aa3a574628318951f99a95 --- puppet/modules/site_config/manifests/remove_files.pp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'puppet/modules/site_config') diff --git a/puppet/modules/site_config/manifests/remove_files.pp b/puppet/modules/site_config/manifests/remove_files.pp index 44e3e47b..3f46659c 100644 --- a/puppet/modules/site_config/manifests/remove_files.pp +++ b/puppet/modules/site_config/manifests/remove_files.pp @@ -33,4 +33,14 @@ class site_config::remove_files { rmdirs => true; } + # leax-mx logged to /var/log/leap_mx.log in the past + # 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" + } + + } -- cgit v1.2.3