- From: Seth Falcon <
>
- To:
- Subject: [chef] Re: How does a definition know which file or template to use?
- Date: Thu, 7 Oct 2010 20:29:56 -0700
Hi Jono,
On Thu, Oct 7, 2010 at 7:10 PM,
<
>
wrote:
>
I have a definition that uses several files and templates to build a
>
tomcat base skeleton. When I call the definition from a recipe in
>
another cookbook it can not find the files nor templates as it is
>
looking in the callers cookbooks instead of the definitions.
>
>
Can I direct the definition to look in the correct place or is there an
>
idiomatically chef way of accomplishing this?
I think you want to specify the cookbook parameter in the resources in
your definition.
E.g.
define :mydef do
template "/opt/so/and/so" do
# stuff
cookbook "mydef"
end
end
Does that help? You might look at the runit cookbook in the Opscode
cookbooks repo
for an example of using (rather involved) definitions.
+ seth
Archive powered by MHonArc 2.6.16.