Hello!
On Jul 16, 2010, at 4:38 PM, Paul Choi wrote:
The wiki says:Two ways.
"Any libraries you include in a Cookbook will automatically be required, and
available within all your Recipes, Attribute Files and Definitions."
Is there a way to make a library global so that it's available to all
cookbooks?
1. Include the cookbook in the run list of the node, or a role on the node.
It doesn't have to do anything - the default.rb can be blank. E.g.,
{ "run_list": [ "recipe[your_library_cookbook]" ] }
That will cause it to be downloaded, and its libraries loaded on the node.
2. Put the cookbook in the metadata of any cookbooks you want to use the
library in. E.g.,
depends "your_library_cookbook"
In metadata.rb of another cookbook where you want to use the library.
Archive powered by MHonArc 2.6.16.