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


resolvconf (14) Versions 0.1.0

Installs/Configures resolvconf

cookbook 'resolvconf', '= 0.1.0'
cookbook 'resolvconf', '= 0.1.0', :supermarket
knife cookbook site install resolvconf
knife cookbook site download resolvconf

resolvconf Cookbook

This cookbook maintains /etc/resolv.conf using the resolvconf package, which is installed by default on Debian/Ubuntu.


A system that supports resolvconf.

  • Ubuntu >= 10.04
  • Debian >= 6.0

Furthermore you need to add the following line to your metadata.rb

depends 'resolvconf'


<table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>['resolvconf']['nameserver']</tt></td> <td>String, Array</td> <td>Nameserver(s) to use</td> <td>OpenDNS Nameservers: <tt>[ '', '' ]</tt></td> </tr> <tr> <td><tt>['resolvconf']['search']</tt></td> <td>String, Array</td> <td>Domain(s) to add to search</td> <td><tt>node['domain']</tt></td> </tr> <tr> <td><tt>['resolvconf']['options']</tt></td> <td>String, Array</td> <td>Other options, e.g. 'rotate'</td> <td><tt>[]</tt></td> </tr>

<tr> <td><tt>['resolvconf']['head']</tt></td> <td>String, Array</td> <td>String(s) to be placed at the top of /etc/resolv.conf, typically a warning</td> <td><tt>[ '# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)', '# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN' ]</tt></td> </tr> <tr> <td><tt>['resolvconf']['base']</tt></td> <td>String, Array</td> <td>String(s) to be placed in the of /etc/resolv.conf, typically configuration like nameserver, search, options</td> <td><tt>[]</tt></td> </tr> <tr> <td><tt>['resolvconf']['tail']</tt></td> <td>String, Array</td> <td>String(s) to be placed at the bottom of /etc/resolv.conf</td> <td><tt>[]</tt></td> </tr>

<tr> <td><tt>['resolvconf']['clear-dns-from-interfaces']</tt></td> <td>Boolean</td> <td>Remove dns-* settings from /etc/network/interfaces, as they might interferre with the configured settings</td> <td><tt>true</tt></td> </tr> </table>



The LWRP basically supports all options that can be set via attributes, and uses the same defaults. It will do the following

  • It will create the necessary files in /etc/resolvconf/resolv.conf.d/
  • Remove dns-* lines from /etc/network/interfaces (unless clear_dns_form_interfaces is specified)
  • Run 'resolvconf -u'


resolvconf 'default'
resolvconf 'custom' do
  nameserver ''
  search     ''
  options    'rotate'

  head       "# Don't touch this configuration file!"
  base       "# Will be added after nameserver, search, options config items"
  tail       "# This goes to the end of the file."

  # do not touch my interface configuration plz!
  clear_dns_from_interfaces false



Installs the resolvconf package.


Includes resolvconf::install, then configures the node using the specified attributes / defaults.


Contributions are very welcome!

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

Authors: Chris Aumann

License: GPLv3

No quality metric results found