Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Send at Success
Browse files Browse the repository at this point in the history
  • Loading branch information
kobayashiAtAnswer committed Mar 11, 2015
1 parent 90b9f0b commit 708615f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/chef/handler/slack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def initialize(options = {})
@team = options[:team] || "doesnotexist"
@username = options[:username] || "chef"
@icon_emoj = options[:icon_emoj] || ":chef:"
@send_at_success = options[:send_at_success] || false
end

def report
Expand All @@ -50,7 +51,7 @@ def report

if run_status.success?
msg = "Chef run Success on *#{source}*"
send(msg)
send(msg) if @send_at_success
else
msg = "Chef run failed on *#{source}*"
if !run_status.exception.nil?
Expand Down

0 comments on commit 708615f

Please sign in to comment.