summaryrefslogtreecommitdiff
path: root/puppet/modules/site_config/manifests/remove
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-01-28 11:12:59 +0100
committervarac <varacanero@zeromail.org>2016-01-28 21:39:40 +0100
commit54bd11793c13140651d908db7f88d550712ee85a (patch)
tree7c55a18498cd05aca071eb5b0c2cfb262dae0129 /puppet/modules/site_config/manifests/remove
parent8effa368557761c23f5496d4a26554b9cec6036c (diff)
[bug] Fix removing of bigcouch logwatch spoolfiles
The problem was that puppet tried to remove them on the couch node, but they need to get removed on monitor node. - Resolves: #7641
Diffstat (limited to 'puppet/modules/site_config/manifests/remove')
-rw-r--r--puppet/modules/site_config/manifests/remove/bigcouch.pp6
-rw-r--r--puppet/modules/site_config/manifests/remove/monitoring.pp7
2 files changed, 8 insertions, 5 deletions
diff --git a/puppet/modules/site_config/manifests/remove/bigcouch.pp b/puppet/modules/site_config/manifests/remove/bigcouch.pp
index 0783fe9d..f8e0ebe2 100644
--- a/puppet/modules/site_config/manifests/remove/bigcouch.pp
+++ b/puppet/modules/site_config/manifests/remove/bigcouch.pp
@@ -10,11 +10,7 @@ class site_config::remove::bigcouch {
Exec['remove_bigcouch_logwatch_stateline']
]
}
- # remove leftover bigcouch logwatch spool files
- exec { 'remove_bigcouch_logwatch_spoolfiles':
- command => 'find /var/lib/check_mk/logwatch -name \'\\opt\\bigcouch\\var\\log\\bigcouch.log\' -exec rm {} \;',
- refreshonly => true,
- }
+
exec { 'remove_bigcouch_logwatch_stateline':
command => "sed -i '/bigcouch.log/d' /etc/check_mk/logwatch.state",
refreshonly => true,
diff --git a/puppet/modules/site_config/manifests/remove/monitoring.pp b/puppet/modules/site_config/manifests/remove/monitoring.pp
index d7095597..ab9f7a8f 100644
--- a/puppet/modules/site_config/manifests/remove/monitoring.pp
+++ b/puppet/modules/site_config/manifests/remove/monitoring.pp
@@ -7,4 +7,11 @@ class site_config::remove::monitoring {
recurse => true,
matches => '*tapicero.log'
}
+
+ # remove leftover bigcouch logwatch spool files
+ exec { 'remove_bigcouch_logwatch_spoolfiles':
+ command => 'find /var/lib/check_mk/logwatch -name \'\\opt\\bigcouch\\var\\log\\bigcouch.log\' -exec rm {} \;',
+ refreshonly => true,
+ }
+
}