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

Select Status

RSS

resolver (33) Versions 2.0.0

Configures /etc/resolv.conf via attributes

Policyfile
Berkshelf
Knife
cookbook 'resolver', '= 2.0.0', :supermarket
cookbook 'resolver', '= 2.0.0'
knife supermarket install resolver
knife supermarket download resolver
README
Dependencies
Changelog
Quality 100%

resolver Cookbook

Build Status Cookbook Version

Configures /etc/resolv.conf, unless the nameservers attribute is empty. Search will be excluded if empty.

Requirements

Platforms

  • Debian/Ubuntu
  • RHEL/CentOS/Scientific/Amazon/Oracle
  • Fedora
  • FreeBSD/OpenBSD
  • Mac OS X
  • Solaris

Chef

  • Chef 12+

Cookbooks

  • none

Attributes

See attributes/default.rb for default values.

  • node['resolver']['search'] - Search list for host-name lookup.
  • node['resolver']['nameservers'] - Required, an array of nameserver IP address strings; the default is an empty array, and the default recipe will not change resolv.conf if this is not set. See Usage.
  • node['resolver']['options'] - a hash of resolv.conf options. See Usage for examples.
  • node['resolver']['domain'] - Local domain name. if nil, the domain is determined from the local hostname returned by gethostname(2).

Recipes

default

Configure /etc/resolv.conf based on attributes.

Usage

Using the default recipe, set the resolver attributes in a role, for example from my base.rb:

"resolver" => {
  "nameservers" => ["10.13.37.120", "10.13.37.40"],
  "search" => "int.example.org",
  "options" => {
    "timeout" => 2, "rotate" => nil
  }
}

The resulting /etc/resolv.conf will look like:

search int.example.org
nameserver 10.13.37.120
nameserver 10.13.37.40
options timeout:2 rotate

License & Authors

Copyright 2009-2016, Chef Software, Inc.

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

    http://www.apache.org/licenses/LICENSE-2.0

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.

resolver Cookbook CHANGELOG

This file is used to list changes made in each version of the resolver cookbook.

2.0.0 (2016-09-07)

  • add support for 'domain' resolv.conf key
  • Switch to root group to support AIX/OS X/FreeBSD
  • Removed the from_server_role recipe. This should be done with a wrapper cookbook instead
  • Add testing with Travis CI and use kitchen-dokken for integration testing
  • Add basic Chefspec testing
  • Add integration testing with Test Kitchen
  • Add Berksfile
  • Update contributing, testing and maintainers docs
  • Improve the readme with chef/platform Requirements
  • Add a Rakefile for simplified testing
  • Use strings for file modes to preserve the leading 0s
  • Add source_url, issue_url and chef_version to the metadata
  • Remove attributes from the metadata since they weren't up to date

v1.3.0 (2015-10-16)

  • Add rubocop file and resolve all rubocop warnings
  • Update the contributing doc to match the new process
  • Use strings for file modes to preserve the leading 0s
  • Add support the domain resolv.conf config option
  • Add a gitignore and chefignore file
  • Added a header to the resolv.conf file stating that chef edited the file
  • Use the Ohai 'root_group' attribute for the config file to support non-Linux *nix platforms. This raises the minimum required version of Chef to 11.14.0 with Ohai 7.2.0.

v1.2.0 (2014-10-16)

  • [#11] Improve safety and sanity of cookbook
  • [#12] README update
  • [#14] Exclude search in template if attribute is empty

v1.1.4

Improvement

v1.1.2

Bug

  • [COOK-2977]: resolver cookbook has foodcritic failures

v1.1.0

  • [COOK-1242] - collect nameservers using a server role, adds from_server_role recipe

v1.0.2

  • 'node' went missing in the template.

v1.0.0

  • [COOK-1089] - accept resolver options via attributes
  • [COOK-1109] - return from resolver recipe if no nameserver attribute is set so resolv.conf doesn't get broken during the run
  • [COOK-1150] - drop the empty element from the nameserver attribute array

Collaborator Number Metric
            

2.0.0 passed this metric

Foodcritic Metric
            

2.0.0 passed this metric