1
votes

With chef-solo, how do you use resources from a cookbook that doesn't define any recipes? For example: https://github.com/Nordstrom/diskpart-cookbook

I've got berks downloading it into the local cookbooks/ folder, where all my other cookbook dependencies go. I've added it to my run_list like this:

{
  "run_list": [ "recipe[otherstuff]", "recipe[diskpart]" ]
}

But when I try to import it, e.g. include_recipe 'diskpart, it just complains that it could not find recipe default for cookbook diskpart.

I'd like to use the resources defined in the repo, e.g. diskpart_disk.

1

1 Answers

1
votes

Add it to the dependencies of the metadata.rb of the cookbook using the resources.

name 'otherstuff'
version '1.2.3'
depends 'diskpart'

That makes all the libraries and resources available to you without touching recipes.