Repository is archived
No commit activity in last 3 years
No release in over 3 years
send chef notifications to slnky
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.0
~> 3.0

Runtime

~> 0.7.0
 Project Readme

Description

Shamelessly stolen from https://github.com/jtimberman/chef-handler-growl

This is a simple Chef report handler that reports status of a Chef run through Slnky.

Requirements

Platform: Mac OS X

Usage

There are two ways to use Chef Handlers.

Method 1

You can install the RubyGem ahead of time, and configure Chef to use them. To do so:

gem install chef-handler-slnky

Then add to the configuration (/etc/chef/solo.rb for chef-solo or /etc/chef/client.rb for chef-client):

require "chef/handler/slnky"
report_handlers << Chef::Handler::SlnkyHandler.new
exception_handlers << Chef::Handler::SlnkyHandler.new

Method 2

Use the chef_handler cookbook by Opscode. Create a recipe with the following:

include_recipe 'chef_handler::default'

# Install the `chef-handler-slnky` RubyGem during the compile phase
# the server that it sends the message to is managed with:
# `node['slnky']['url']`
# set this in a recipe or attributes file to point the handler
# to the server
# if you set `node['slnky']['yaml']` to the location of a yaml file
# it will load the data and include it in the event in the `attributes` key
chef_gem "chef-handler-slnky" do
  action :upgrade
end

# Then activate the handler with the `chef_handler` LWRP
chef_handler "Chef::Handler::SlnkyHandler" do
  source "chef/handler/slnky"
  action :enable
end

Roadmap

Things I would like to add:

  • rspec tests - both Chef::Handler and GNTP#notify have specs, so this was low priority.

License and Author

see LICENSE.txt