Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only create monit alerts config when alerts configured.

  • Loading branch information...
commit 7099d516a14bf24c709da336d0c0e70f295ff4ff 1 parent 2b728dc
@roidrage roidrage authored
Showing with 9 additions and 7 deletions.
  1. +9 −7 worker_host/monit/recipes/default.rb
View
16 worker_host/monit/recipes/default.rb
@@ -31,13 +31,15 @@
end
if node[:monit][:checks][:enabled].any?
- template "/etc/monit/conf.d/alerts.monitrc" do
- source "alerts.erb"
- owner "root"
- group "root"
- mode "0600"
- variables :alerts => node[:monit][:alerts]
- notifies :run, resources(:execute => "monit-reload")
+ if node[:monit][:alerts].any?
+ template "/etc/monit/conf.d/alerts.monitrc" do
+ source "alerts.erb"
+ owner "root"
+ group "root"
+ mode "0600"
+ variables :alerts => node[:monit][:alerts]
+ notifies :run, resources(:execute => "monit-reload")
+ end
end
node[:monit][:checks][:enabled].each do |check|
Please sign in to comment.
Something went wrong with that request. Please try again.