- From: Seth Chisamore <
>
- To:
- Subject: [chef] Re: Using a template inside a provider
- Date: Wed, 20 Apr 2011 13:00:29 -0400
Alex,
Look into the 'cookbook' attribute for the template resource:
http://wiki.opscode.com/display/chef/Resources#Resources-Template
You can then expose this as an attribute on your LWRP. The default would be
set to the cookbook your LWRP lives in. Then pass this value (passed in as an
LWRP attribute) directly down to the template resource used in your provider
making for easy overrides.
Seth
--
Opscode, Inc.
Seth Chisamore, Senior Technical Evangelist
IRC, Skype, Twitter, Github: schisamo
On Wednesday, April 20, 2011 at 7:21 AM, Alex Kiernan wrote:
I'm working on a provider for delivering tomcat instances (so separate
>
CATALINA_BASE/CATALINA_HOME), but I need to deliver customised
>
versions of some of the standard config files (e.g.
>
catalina.properties). Trying to use a template inside the provider
>
works fine, but the recipe consuming the provider then has to know
>
that it needs that template file inside its template directory.
>
>
Is there some way to package templates alongside the provider? Or
>
maybe I'm going about this the wrong way... I'll want to be able to
>
override those file defaults too in different recipes.
>
>
Any thoughts?
>
>
--
>
Alex Kiernan
>
Archive powered by MHonArc 2.6.16.