Chef activity: Get Recipes

The Get Recipes activity retrieves all recipes stored in a version of a cookbook.

Unlike the Get Cookbook Data activity, the Get Recipes activity does not get attribute information. The activity stores retrieved recipes in the recipes sensor script variable as an array of JavaScript objects. Each object in this array contains the following fields, as well as all fields returned by the Chef Request activity:

Table 1. Array object fields
Object Definition
cookbook_name The name of the cookbook, passed in the Cookbook data activity input variable
cookbook_version The version of the cookbook, passed in the Cookbook data activity input variable
recipes An array of JavaScript objects that lists the recipes contained in the cookbook. Each object in this array contains the name of a single recipe and the description of that recipe
Table 2. Results table
Result Definition
Success The Chef request was successful
Failure The Chef request failed, the Chef server was unavailable, or the Chef server rejected the supplied credentials
Table 3. Input variables table
Field Description
Cookbook data An array of JavaScript objects that lists the cookbooks to get recipes from. Each object in the array contains the following fields:
  • cookbook_name: the name of the cookbook to get recipes from.
  • cookbook_version: the version of the cookbook to get recipes from.