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

RSS

resolver (18) Versions 2.2.0

Configures /etc/resolv.conf via attributes

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

resolver Cookbook

Cookbook Version CI State OpenCollective OpenCollective License

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

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Requirements

Platforms

  • AIX
  • Debian/Ubuntu
  • RHEL/CentOS/Scientific/Amazon/Oracle
  • Fedora
  • FreeBSD/OpenBSD
  • macOS
  • Solaris
  • openSUSE / SUSE Enterprise

Chef

  • Chef 12.1+

Cookbooks

  • none

Attributes

See attributes/default.rb for default values.

  • node['resolver']['search'] - an array of search domains for host-name lookup; a string may also be provided for backwards compatibility. Limited to 6 elements and 256 characters.
  • 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', 'ext.example.org' ],
  'options' => {
    'timeout' => 2, 'rotate' => nil
  }
}

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

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

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

resolver Cookbook CHANGELOG

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

2.2.0 - 2021-02-10

  • Sous Chefs Adoption
  • Add InSpec Tests
  • Remove Deprecated Platforms, Centos 6, Ubuntu 16.04, opensuse-42, fedora-29

2.1.0 (2018-07-18)

  • Test with Local Delivery instead of Rake
  • Update Apache license string in metadata
  • the search stanza should be an array rather than a single element. resolv.conf search allows up to six search domains to be defined. Have updated the recipes with some rules (no more than 6 domains or 256 chars), change the ['resolver']['search'] into an array and changed teh template unless block to search for an empty array instead
  • add aix support

2.0.1 (2017-02-24)

  • Fix compatibility with old chef 12 clients
  • Remove old recipe from the metadata
  • Call out SUSE support in the readme and metadata

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

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

No quality metric results found