Default search path for cookbook
31,536
Default cookbook path could be set in ~/.chef/knife.rb
:
...
cookbook_path [ '~/cookbooks/', '~/base-cookbooks/']
...
Also, you could find knife.rb documentation useful.
Author by
slayedbylucifer
A hopelessly devoted father and a husband who does Linux plumbing for survival. The only other interest he has is listening to heavy/thrash metal and strumming his acoustic guitar.
Updated on January 21, 2020Comments
-
slayedbylucifer over 4 years
I am a chef Newbie and facing an issue.
Every time I run any of the knife cookbook command, I have to explicitly provide the path to cookbook using
-o /path/to/cookbook
else it will error out saying no cookbooks found. Please find below commands:$ knife cookbook upload getting-started ERROR: Could not find cookbook getting-started in your cookbook path, skipping it ERROR: Failed to upload 1 cookbook. $ knife cookbook upload getting-started -o /home/chefuser/chef11/chef-repo/cookbooks/ Uploading getting-started [0.4.0] Uploaded 1 cookbook.
Question:
I want to know/list the default search path for cookbooks and need to know how to modify it.
Also, why it is not looking at cookbook path and I have to provide it explicitly?
Thanks.