- From: Steffen Gebert <
>
- To:
- Subject: [chef] Re: Customizing the templates of a community cookbook?
- Date: Sun, 26 May 2013 16:47:59 +0200
Hi,
I used to use chef-rewind until I got the tip form Joshua to just access
the resource collection via resources().
So, I'd be interested in what's the benefit of the chef-rewind gem?
Thanks for explaining
Steffen
On 5/26/13 2:40 PM, Zac Stevens wrote:
>
On Sun, May 26, 2013 at 1:24 PM, Morgan Blackthorne
>
<
>wrote:
>
>
> What's the "right" way to handle this? I'm looking to migrate over to
>
> using Berkshelf and something that I'm coming across is that I've got a
>
> package or two where I've customized the templates generated by a community
>
> cookbook for my specific use (either via OS or host directories).
>
>
>
> Is it better to create a wrapper cookbook, or is there some other way to
>
> handle this that I'm missing? I found a previous thread on this here:
>
> http://lists.opscode.com/sympa/arc/chef/2012-07/msg00038.html, but it
>
> looks like whatever scenario they were referencing is no longer in the
>
> documentation. (Not sure if it didn't last from the wiki -> doc conversion,
>
> or if it had been removed from the wiki prior to that.)
>
>
>
>
I was able to load the old page using the wayback machine (
>
http://web.archive.org/web/20120624062311/http://wiki.opscode.com/display/chef/Templates),
>
but it isn't too helpful in this case.
>
>
You'll need a wrapper cookbook which contains your local template, with a
>
recipe that re-opens the resource in the original cookbook and changes its
>
"cookbook" parameter to point to your wrapper cookbook. Joshua Timberman
>
has a blog post describing this, though his example is changing service
>
resources:
>
>
http://jtimberman.housepub.org/blog/2012/11/19/chef-repository-berkshelf-conversion/
>
>
If you'd prefer a little sugar, the chef-rewind gem offers your exact use
>
case as an example: https://github.com/bryanwb/chef-rewind
>
>
Hope that helps,
>
>
>
Zac
>
Archive powered by MHonArc 2.6.16.