Created
February 6, 2012 20:20
-
-
Save fujin/1754571 to your computer and use it in GitHub Desktop.
Passing args to a handler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Mon, 06 Feb 2012 19:59:35 +0000] INFO: Processing chef_handler[Medidata::RunLoggerHandler] action enable (mdsol_oq::default line 60) | |
[Mon, 06 Feb 2012 19:59:35 +0000] ERROR: chef_handler[Medidata::RunLoggerHandler] (mdsol_oq::default line 60) has had an error | |
[Mon, 06 Feb 2012 19:59:35 +0000] ERROR: chef_handler[Medidata::RunLoggerHandler] (/var/cache/chef/cookbooks/mdsol_oq/recipes/default.rb:60:in `from_file') had an error: | |
chef_handler[Medidata::RunLoggerHandler] (mdsol_oq::default line 60) had an error: wrong number of arguments (1 for 0) | |
/var/chef/handlers/runlogger.rb:7:in `initialize' | |
/var/cache/chef/cookbooks/chef_handler/providers/default.rb:24:in `new' | |
/var/cache/chef/cookbooks/chef_handler/providers/default.rb:24:in `block in class_from_file' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chef_handler "Medidata::RunLoggerHandler" do | |
source "/var/chef/handlers/runlogger.rb" | |
arguments node[:mdsol][:temp_loc] | |
action :enable | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chef_handler "Medidata::RunLoggerHandler" do | |
source "/var/chef/handlers/runlogger.rb" | |
arguments node[:mdsol][:temp_loc] | |
action :enable | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'chef/handler' | |
require 'rubygems' | |
module Medidata | |
class RunLoggerHandler < Chef::Handler | |
attr_accessor :temp_loc | |
def initialize(temp_loc=nil) | |
self.temp_loc = temp_loc | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment