Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

Get cookbook data

Log in to subscribe to topics and get notified when content changes.

Get cookbook data

The Get Cookbook Data activity retrieves the recipes and attributes from a given cookbook.

The activity stores the retrieved cookbook data in the cookbookData sensor script variable as an array of JavaScript objects. Each object contains the following fields, as well as all fields returned by the Chef Request activity:

Table 1. Array object fields
Object Description
name The name of the cookbook
recipes A list of recipes stored in the cookbook
attributes A parameter that controls the behavior of a node, such as the port used by a web server
Table 2. Results table
Result Definition
Success the Chef server returned a response. The activity returns a successful result even if one or more Chef requests failed. To determine the success of a specific request, use the success value from an object stored in the cookbookData variable
Failure The Chef server was not available or rejected the supplied credentials
Table 3. Input variables table
Field Description
Cookbook data An array of JavaScript objects that defines which cookbooks to get data from. Each object contains the following fields:
  • cookbook_name: the name of the cookbook to get data for.
  • cookbook_version: the version of the cookbook to get data for.