Is there a way to get the cookbook_path
(defined in either solo.rb
or client.rb
) from within a recipe?
I've found this bit:
run_context.cookbook_collection
Which outputs the cache path of cookbooks, but not the original cookbook_path
Is there a way to get the cookbook_path
(defined in either solo.rb
or client.rb
) from within a recipe?
I've found this bit:
run_context.cookbook_collection
Which outputs the cache path of cookbooks, but not the original cookbook_path
You can access the Chef Client's / Solo's configuration settings through Chef::Config
. In your case, use:
Chef::Config[:cookbook_path]