Use Custom Library files in wrapper cookbook

Can i use custom files to override library cookbook’s library files, template files etc in my wrapper cookbook?

It depends on the cookbook, you will need to look through the cookbooks lwrps/custom resources to determine this. An example is in the elasticsearch cookbook: . If the upstream cookbook does not support some way of overriding this you next best thing is to use chef rewind:

I have done the above template overriding for elasticsearch. Now im working with logstash cookbook(wrapper). i need to override the config files defined in the library section there “”. Need to try the chef rewind thing. Looks good.

Looks like you can do it here: and . Hope that helps.

Actually my requirement is i need to use my custom made file instead of this Kind of confused on that.

Gotcha, seems like the simple solution is to not call that resource in your recipe in your wrapper. Not sure if other resources rely on it so it might be a bit more work.

Okay. If i understand correctly , i should create a new resource in my wrapper cookbook’s my-cookbook/library files

and use that in resource in recipe?


Cool. Let me try that. Thanks for quick replies and help