[chef] Re: Re: Re: Re: Re: Email notification upon success or failure (with logs)


Chronological Thread 
  • From: Maven User < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Email notification upon success or failure (with logs)
  • Date: Tue, 25 Oct 2011 14:54:07 -0400

Sorry - I was JUST typing out the reply saying I got it working.

You need to pass in an array as part of how the default handler provider works:

def collect_args(resource_args = [])
  if resource_args.is_a? Array
    resource_args
  else
    [resource_args]
  end
end

If I pass in just two plain strings, then it complains I've only passed in one of two required arguments.

Thank you so much for your patience - I'm (obviously) new to ruby as well!


On Tue, Oct 25, 2011 at 2:49 PM, Andrea Campi < "> > wrote:
Try this:

chef_handler "MYLibs::Email" do
      source "C:/chef/handlers/Email.rb"
      arguments " " target="_blank"> ", " " target="_blank"> "
      action :enable
    end

The constructor in the wiki example takes two plain arguments, you are passing a hash.
chef_handler "MYLibs::Email" do
      source "C:/chef/handlers/Email.rb"
      arguments :from_address => " " target="_blank"> ", :to_address => " " target="_blank"> "
      action :enable
    end




Archive powered by MHonArc 2.6.16.

§