How to extend chef resource? -
i'm trying extend bash
resource, when invoke shm_wbash
, command's output placed in log file runs. since don't want copy available parameters lwrp resource definition, i've tried extend original chef bash resource (i'll omitting actual payload since doesn't matter here):
class chef class resource class wbash < resource::bash def initialize(name, run_context=nil) super puts 123 end end end end
i've put cookbooks/shm/libraries/wbash.rb
, when try run it, no resource or method named 'shm_wbash' for
chef::recipe "test"'`. how fix this?
use w_bash
this chef converting class name use in dsl.
Comments
Post a Comment