X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/ceb801ff008b6125d3a359635295f5091088f520..d8918f9ea40389c835f6a8d740d2ea95ddfceedb:/cookbooks/chef/templates/default/report.rb.erb?ds=sidebyside diff --git a/cookbooks/chef/templates/default/report.rb.erb b/cookbooks/chef/templates/default/report.rb.erb index 0317f9286..518ec1383 100644 --- a/cookbooks/chef/templates/default/report.rb.erb +++ b/cookbooks/chef/templates/default/report.rb.erb @@ -17,7 +17,7 @@ class Chef if failed? && !exception.is_a?(SystemExit) subject = "Chef run failed on #{node.name}" message = "#{run_status.formatted_exception}\n" - elsif elapsed_time > 300 + elsif elapsed_time > 600 subject = "Chef run took #{elapsed_time} on #{node.name}" message = "" end @@ -26,10 +26,14 @@ class Chef message << Array(backtrace).join("\n") - require "pony" + require "mail" - Pony.mail(:to => @config[:to], :from => @config[:from], - :subject => subject, :body => message, :via => :smtp) + Mail.deliver do + to @config[:to] + from @config[:from] + subject subject + body message + end end end end