- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: Re: Re: LWRP prevents code-reuse...
- Date: Thu, 1 Jul 2010 08:50:44 -0700
On Wed, Jun 30, 2010 at 6:46 AM, Ringo De Smet
<
>
wrote:
>
AJ,
>
>
On 30 June 2010 00:56, AJ Christensen
>
<
>
>
wrote:
>
> Chuck it in a library
>
>
Tnx for the tip.
>
>
One subsequent question though: the documentation states that
>
libraries are automatically "require"-d in your recipes, but what if
>
you want to "require" one library into another? I tried the following
>
variants:
>
>
require "qshell_resource"
>
require "libraries/qshell_resource"
>
require "<cookbook>/libraries/qshell_resource"
>
>
to refer to "<cookbook>/libraries/qshell_resource.rb".
Chef will automatically load them, but not in any guaranteed order. If
they are all in the same cookbook, I'd recommend using something like:
require File.dirname(__FILE__) + '/qshell_resource'
>
>
None of them worked.
>
>
Ringo
>
- [chef] Re: Re: Re: LWRP prevents code-reuse..., Daniel DeLeo, 07/01/2010
Archive powered by MHonArc 2.6.16.