Reputation: 21
Is there a knife command I can issue that will list recipes available under a chef environment (based on the Cookbook Version Constraints)?
Adding additional information:
In the chef server interface, when you edit the node run list, I see when you select the environment from the drop down it makes a rest call:
/environments/development/recipes
Which returns an array of recipes. So there's no way to run a search query through knife to do the same?
Upvotes: 2
Views: 1298
Reputation: 21
So there's no single command:
To get the available recipes for an environment using knife:
Upvotes: 0
Reputation: 4223
I assume the notion here is that some recipes are not available in earlier versions of a cookbook. Unfortunately, I'm now aware of any command that can list the recipes in a particular cookbook version, short of downloading the version and doing an ls recipes
on it. Likewise, there is not a knife command that can do this across all cookbooks/versions available to a given environment.
Upvotes: 0
Reputation: 54267
All recipes are always available per se, just a question of what versions things will resolve to. You can use the knife-solve
gem to see version solutions fro your workstation.
Upvotes: 1