chefdatabag

Overview

The Chef module supports Data Bags, which are used to store nested data (e.g. attributes) that applies across nodes. They are especially useful when configuring multiple nodes that will function together to provide a single logical service.

Data Bags are not directly associated with node or role attributes. When using Data Bags with a Chef server, they are stored on the server and indexed for searching. When using Data Bags with Chef Solo, Data Bags are stored in a directory hierarchy on the virtual machine running Chef Solo. Recipes can load Data Bags directly or search a Data Bag for specific values similar to attributes in node indexes.

Parameters

Name Type Constraints Default Definition
name string     Creates a name for a databag.
items map   {} Specifies a databag’s items.
overwrite bool   false Overwrites a databag.
endpoint string required   URL to the Chef server API endpoint.
identity string     Chef client identity that will be used to create new client certificates and node objects on the Chef server.
credential pem     Chef client key must be in a strictly specific format: written in a single line and all new lines must be clearly indicated with \n.

Return Values

Name Type Definition
(TBD)    

Example Usage

chefdatabag:
  action: chefdatabag
  phase: createdatabag
  precedingPhases: [ provision ]
  parameters:
    name: xwiki
    items:
      main:
        db:
          name: xwiki
          password: password
          user: user
        war:
          checksum: "cb0e520f0610a433b5e47fd921ca35c3b1755181b4e644e1c794b2b9bc32c97c"
          url: "https://s3-eu-west-1.amazonaws.com/griddynammics-genesis/xwiki-enterprise-web-3.0.war"

    endpoint: $chefEndpoint
    identity: $chefIdentity
    credential: $chefCredential