Can you call a library defined in cookbook A from a recipe in cookbook B?
-J
Can you call a library defined in cookbook A from a recipe in cookbook B?
-J
Yes, just make sure you set A as a dependency to B in the metadata file so it will get transferred correctly.
--Noah
On May 9, 2011, at 11:05 AM, Jason J. W. Williams wrote:
Can you call a library defined in cookbook A from a recipe in cookbook B?
-J
On Mon, May 9, 2011 at 12:10 PM, Noah Kantrowitz noah@coderanger.net wrote:
Yes, just make sure you set A as a dependency to B in the metadata file so it will get transferred correctly.
Cool. Thank you. In the Libraries example when the library is named
Chef::Recipe::ISP, the recipe only needs to refer to ISP. Is this
still true if you're calling a library in another cookbook or is there
additional namespace references needed?
-J
I would put the library into it's own namespace entirely, not within
the Chef namespace - just for safeties sake.
Adam
On Mon, May 9, 2011 at 11:19 AM, Jason J. W. Williams
jasonjwwilliams@gmail.com wrote:
On Mon, May 9, 2011 at 12:10 PM, Noah Kantrowitz noah@coderanger.net wrote:
Yes, just make sure you set A as a dependency to B in the metadata file so it will get transferred correctly.
Cool. Thank you. In the Libraries example when the library is named
Chef::Recipe::ISP, the recipe only needs to refer to ISP. Is this
still true if you're calling a library in another cookbook or is there
additional namespace references needed?-J
--
Opscode, Inc.
Adam Jacob, Chief Product Officer
T: (206) 619-7151 E: adam@opscode.com