I have my own Chef cookbook located in the cookbook's default path. However, due to the fact that I dont want to store external cookbooks into git version control, I have created a new path for external cookbooks specified in the Berkfile. So the structure of my chef stuff is like:
Chef
|__cookbooks
| |_myCookbook
| |__metadata.rb
|__external_coobooks
| |_windows
|__berkfile
|__ ... ...
The issue is since I store all the cookbooks in 2 different places and when run ChefSpec for my own cookbook, the metadata.rb complains that it couldn't find the other external cookbooks that I referenced.
# metadata.rb
name 'myCookbook'
chef_version '>= 14.0'
depends 'windows', '~> 5.3.0'
I have googled this issue and tried to find a way to reference the path for the windows cookbook, but still haven't found any solution. Just wondering if you guys have any ideas about this?
I got an unideal workout which is to move all the cookbooks under the default cookbook path and add all the external cookbooks into the .gitignore file. However, this solution is not really nice in terms of managing all the cookbooks in the long-term.
Thanks.