Run Notifier to notify Slack And / Or Hipchat when Chef run successfully/failed.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
attributes
config
nodes
recipes
.gitignore
.kitchen.yml
.rspec
.ruby-version
Berksfile
Berksfile.lock
Gemfile
Gemfile.lock
README.md
Rakefile
Vagrantfile
_config.yml
chef-run-notifier.json
chefignore
metadata.rb

README.md

chef-run-notifier Cookbook

Run Notifier to send notification to HipChat and / or Slack if chef run successfully or failed. https://supermarket.chef.io/cookbooks/run-notifier

screen shot 2017-12-11 at 8 21 29 pm

Requirements

  • Chef version 11
  • Chef version 12
  • Chef version 13

Attributes

Key Type Description Default
['run_notifier']['slack']['enabled'] Boolean Wheather to enable slack or not false
['run_notifier']['slack']['webhook_url'] String Webhook URL https://abc.com
['run_notifier']['slack']['channel'] String Channel #default
['run_notifier']['slack']['username'] String Username FainNow
['run_notifier']['hipchat']['enabled'] Boolean Wheather to enable hicphat or not false
['run_notifier']['hipchat']['api_token'] String HipChat API token 1234
['run_notifier']['hipchat']['username'] String Username FaiNow
['run_notifier']['hipchat']['room_name'] String Room name default
['run_notifier']['hipchat']['notify'] Boolean Whether to notify user or not true
['run_notifier']['custom_messages']['success_message'] String custom success message '"Chef run succesfully on #{node.name}"'
['run_notifier']['custom_messages']['failed_message'] String custom failed message '"Failure on #{node.name}: #{run_status.formatted_exception}"'

Usage

chef-run-notifier::default

Just include chef-run-notifier in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[run-notifier]"
  ]
}

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass, bundle exec rspec as well as kitchen test
  6. Submit a Pull Request using Github

License and Authors

Author: Faizal Zakaria