Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Latest commit

 

History

History
71 lines (49 loc) · 1.76 KB

README.md

File metadata and controls

71 lines (49 loc) · 1.76 KB

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