Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

The dynect cookbook has been deprecated

The dynect cookbook has been deprecated and is no longer being maintained by its authors. Use of the dynect cookbook is no longer recommended.


dynect (16) Versions 1.0.9

LWRP for managing DNS records with Dynect's REST API

cookbook 'dynect', '= 1.0.9'
cookbook 'dynect', '= 1.0.9', :supermarket
knife supermarket install dynect
knife supermarket download dynect
Quality 0%


Automatically configures system DNS using Dyn's API.


Chef 0.8+.

A Dynect account.

The dynect_rest gem. The dynect::default recipe installs this gem from

Works on any platform Chef runs on that can install gems from


The following attributes need to be set either in a role or on a node directly, they are not set at the cookbook level:

  • dynect.customer - Customer ID
  • dynect.username - Username
  • dynect.password - Password
  • - Zone
  • dynect.domain - Domain

Example JSON:

  "dynect": {
    "customer": "CUSTOMER",
    "username": "USERNAME",
    "password": "PASSWORD",
    "zone": "ZONE",
    "domain": "DOMAIN"

EC2 specific attributes:

  • dynect.ec2.type - type of system, web, db, etc. Default is 'ec2'.
  • dynect.ec2.env - logical application environment the system is in. Default is 'prod'.



DNS Resource Record.


Applies to the DNS record being managed.

  • :create
  • :replace
  • :update
  • :delete

Attribute Parameters:

  • record_type - DNS record type (CNAME, A, etc)
  • rdata - record data, see the Dyn API documentation.
  • ttl - time to live in seconds
  • fqdn - fully qualified domain name
  • username - dyn username
  • password - dyn password
  • customer - dyn customer id
  • zone - DNS zone

None of the parameters have default values.


dynect_rr "webprod" do
  record_type "A"
  rdata({"address" => ""})
  fqdn "webprod.#{node.dynect.domain}"
  customer node[:dynect][:customer]
  username node[:dynect][:username]
  password node[:dynect][:password]
  zone     node[:dynect][:zone]


This cookbook provides the following recipes.


The default recipe installs Adam Jacob's dynect_rest gem during the Chef run's compile time to ensure it is available in the same run as utilizing the dynect_rr resource/provider.


Only use this recipe on Amazon AWS EC2 hosts!

The dynect::ec2 recipe provides an example of working with the Dyn API with EC2 instances. It creates CNAME records based on the EC2 instance ID (node.ec2.instance_id), and a constructed hostname from the dynect.ec2 attributes.

The recipe also edits /etc/resolv.conf to search compute-1.internal and the dynect.domain and use dynect.domain as the default domain, and it will set the nodes hostname per the DNS settings.


The dynect::a_record recipe will create an A record for the node using the detected hostname and IP address from ohai.


Information on the Dynect API:

Dynect REST Ruby Library:


Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.


v1.0.9 (2015-02-18)

  • Reverting chef_gem compile_time work

v1.0.8 (2015-02-18)

  • Fixing chef_gem with Chef::Resource::ChefGem.method_defined?(:compile_time)

v1.0.7 (2015-02-18)

  • Fixing chef_gem for Chef below 12.1.0

v1.0.6 (2015-02-17)

  • Being explicit about usage of the chef_gem's compile_time property.
  • Eliminating future deprecation warnings in Chef 12.1.0.


  • [COOK-2382]: dynect: foodcritic style change


  • [COOK-2381] - dynect: /etc/hosts entry does not get updated on Amazon Linux due to regex mismatch


  • [COOK-1958] - use chef_gem for runtime gem requirement

Foodcritic Metric

1.0.9 failed this metric

FC031: Cookbook without metadata file: /tmp/cook/ef7e0b8987cf0b9bd469d9bb/dynect/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/ef7e0b8987cf0b9bd469d9bb/dynect/metadata.rb:1