So I’m following along with the exception and report handler example (
http://wiki.opscode.com/display/chef/Exception+and+Report+Handlers) and I
have a couple of questions.
I’ve got the chef_handler configured in my recipe like this:
chef_handler "MYLibs::Email" do
arguments :from_address => "firstname.lastname@example.org", :to_address => "
This based on the initialization method in the Email class:
def initialize(from_address, to_address)
@from_address = from_address
@to_address = to_address
But that results in:
[Tue, 25 Oct 2011 13:24:29 -0400] FATAL: ArgumentError:
chef_handler[MYLibs::Email] (email_demo::default line
/chef/cache/cookbooks/email_demo/recipes/default.rb) had an error: wrong
number of arguments (1 for 2)
When I look at the json output, I can clearly see both defined:
Am I passing in the initialization arguments wrong?
On Tue, Oct 25, 2011 at 12:12 PM, Maven User email@example.com wrote:
Hmmm - I don’t see anything in the chef-client cookbook about handlers:
So if I pull down the chef_handler cookbook and add a new handler - don’t I
just depend on that in my recipe?
On Tue, Oct 25, 2011 at 11:57 AM, Andrea Campi <
On Oct 25, 2011, at 5:44 PM, Daniel DeLeo firstname.lastname@example.org wrote:
On Tuesday, October 25, 2011 at 7:51 AM, Maven User wrote:
Looking over various available cookbooks, searching through the wiki
and then good 'ol google - I didn’t find a way to incorporate a mailing
notification that didn’t require additional software to be installed on the
What is the typical approach for sending email notification when a
chef-client run is complete?
Are handlers really the only way?
Yes, handlers are the only way at present. Server side notifications may
be added in a future release of Chef, but there’s nothing set in stone at
That said, it needn’t be manual; look at the handlers recipe in the