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


dhcp (53) Versions 8.1.3

Installs and configures DHCP

cookbook 'dhcp', '= 8.1.3', :supermarket
cookbook 'dhcp', '= 8.1.3'
knife supermarket install dhcp
knife supermarket download dhcp
Quality 50%

DHCP Cookbook

Cookbook Version
Build Status

Installs and configures ISC DHCP server in both DHCP and DHCPv6 mode.

  • Supports setting up Master/Slave ISC DHCP failover (IPv4 only).
  • Includes Support for DDNS
  • Includes resources for managing:
    • Package installation
    • Service configuration and management
    • Global configuration
    • Hosts
    • Groups
    • Subnets
    • Shared subnets

Version 7.0.0 constitutes a major change and rewrite, please see [](./


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 or come chat with us on the Chef Community Slack in #sous-chefs.


  • Debian / Ubuntu
  • RHEL/CentOS and derivatives
  • Fedora and derivatives


  • Chef 14+


It is recommended to create a project or organization specific wrapper cookbook and add the desired custom resources to the run list of a node.

Example of a basic server listening on and issuing leases for the subnet

dhcp_install 'isc-dhcp-server'

dhcp_service 'dhcpd' do
  ip_version :ipv4
  action [:create, :enable, :start]

dhcp_config '/etc/dhcp/dhcpd.conf' do
  allow %w(booting bootp unknown-clients)
    'default-lease-time' => 7200,
    'max-lease-time' => 86400,
    'update-static-leases' => true,
    'one-lease-per-client' => true,
    'authoritative' => '',
    'ping-check' => true
    'domain-name' => '"test.domain.local"',
    'domain-name-servers' => ','
  action :create

dhcp_subnet '' do
  comment 'Basic Subnet Declaration'
  subnet ''
  netmask ''
  options [
    'peer' => '',
    'range' => ''
    'ddns-domainname' => '"test.domain"'

External Documentation


Please check for more varied working examples in the [test cookbook](./test/cookbooks/test/).


  • [dhcp_class](documentation/
  • [dhcp_config](documentation/
  • [dhcp_group](documentation/
  • [dhcp_host](documentation/
  • [dhcp_package](documentation/
  • [dhcp_service](documentation/
  • [dhcp_shared_network](documentation/
  • [dhcp_subnet](documentation/


This project exists thanks to all the people who contribute.


Thank you to all our backers!


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


8.1.3 - 2023-02-27

8.1.2 - 2023-02-27

8.1.1 - 2023-02-14

  • Remove delivery folder

8.1.0 - 2021-08-29

8.0.1 - 2021-06-01

8.0.0 - 2021-05-12

  • Chef 17 compatibility changes - @bmhughes
    • All resources now run with unified_mode true

7.3.0 - 2021-03-30

  • Fix generating multiple actions from the service resource - @bmhughes

7.2.1 - 2020-11-19

  • Enhance the pre-service action configuration test to remove compile/converge bug - @bmhughes

7.2.0 (2020-07-10)

  • resolved cookstyle error: libraries/helpers.rb:120:44 refactor: ChefCorrectness/InvalidPlatformInCase
  • resolved cookstyle error: libraries/helpers.rb:154:24 refactor: ChefCorrectness/InvalidPlatformFamilyInCase
  • resolved cookstyle error: libraries/helpers.rb:161:14 refactor: ChefCorrectness/InvalidPlatformFamilyInCase
  • resolved cookstyle error: libraries/helpers.rb:193:44 refactor: ChefCorrectness/InvalidPlatformInCase
  • Fix the service resource not using the unit file content property
  • Slightly simplified the libraries with a platform helper
  • Fix verification of the isc-dhcp-server configuration on Ubuntu
  • Ensure that a service restart does not occur upon a configuration test failure

7.1.1 (2020-05-20)

  • Fix configuration test running every chef run regardless of service action - @bmhughes

7.1.0 (2020-05-18)

  • Add configuration test option to the dhcp_service resource - @bmhughes

7.0.0 (2020-04-17)

Version 7.0.0 is a major change! Please see [](./

  • DHCPv6 server configuration support - @bmhughes
  • Migrated to github actions - @Xorima
  • Remodel cookbook as resource library - @bmhughes
  • Remove - @bmhughes
    • Attributes
    • Recipes
    • Data bag functionality
  • Add resources to manage install and services for dhcpd/dhcpd6 - @bmhughes
  • Rewrite resources to current standard removing pure ruby code - @bmhughes

6.1.0 (2019-10-19)

6.0.0 (2018-03-04)

  • Remove matchers. Breaking change. This requires ChefDK 2.0+
  • Allow specifying array of allow and deny declarations in dhcp_subnet pool
  • Convert to custom resources
  • Drop support for Chef 12
  • Add support for Fedora

5.5.0 (2018-03-04)

  • Use Berkshelf instead of Policyfiles
  • Remove support for RHEL5

5.4.4 (2018-03-04)

  • Use dokken images for travis testing

5.4.3 (2018-03-04)

  • Require Chef 12.7+ for apt_update fix

5.4.2 (2017-12-02)

  • Remove Chef 10/11 compatibility code that resulted in Foodcritic deprecation warnings
  • Fix misplaced closing brace for dhcpd hooks in template file


  • Fix: attribute breaking Chef 13 runs.


  • Added hooks


  • bug #67: Removed blank? from helper libraries but was still calling in code. Addressed by removing blank? calls from code and using empty? instead.


  • bug: Update _hosts recipe for Helpers::DataBags.escape_bagname change to Dhcp::Helpers.escape


  • Remove dependencies on helper cookbooks


  • Add allow attribute for pool in dhcp_subnet provider


  • Allow specifying with node['dhcp']['extra_files'] externally managed configs to load


  • bug: Load classes before subnets


  • bug: Include classes.d/list.conf in dhcp.conf
  • bug: Make dhcp_subnet names declared in dhcp_shared_network more unique


  • bug: Pin partial templates to dhcp cookbook


  • BREAKING feature: Allow defining multiple pools in a subnet

    • This moves range and peer attribtue from dhcp_subnet block to embedded pool block inside dhcp_subnet. See updated examples.
    • Currently this DOES NOT break defining subnets via data_bags or node attributes


  • bug: Allow defining dhcp_class with no subclasses


  • improve: Add dhcp_class ChefSpec matcher


  • feature: dhcp_class provider


  • fix: be able to declare a blank subnet inside a shared-network


  • feature: dhcp_shared_network provider to define subnets inside a shared-network block
  • improve: allowing as blank as possible of a subnet block
  • improve: setting next-server in a subnet block
  • improve: allow dhcp_subnet range to be set with a String
  • improve: documentation
  • fix: including dhcp_host config files
  • fix: Chef 12 support
  • fix/improve: testing


  • feature: allow setting multiple ranges in subnets. The range param now HAS to be an array, existing cooks will not work.
  • improve: hostname in group configs is no long forced instead you can specify this in paramaters you pass.


  • fix: Debian system have Chef with version Chef: 11.10.0.rc.1 that Chef::Version doesn't detect correctly
  • fix: handle case where peer is unavailable on cluster start
  • improve: better chef-solo support
  • feature: Allow setting slaves and masters in attributes.
  • feature: Added ability to pass eval into subnets


  • support attribute driven mode, where no databags are needed to operate
  • feature: add evals to groups
  • fix error in subnet provider caused by mis-merged comma :(


  • change write_config to write_include, write_config doesn't work on ubuntu 12.04
  • allow you to set ddns-domainname for each subnet
  • convert "not if"'s to "unles"
  • Cleanup Readme for readability and attribution
  • update contributors


  • add tailor cane, kitchen testing
  • chef specs for chefspec 3.0
  • allow ddns update in subnet (pull request #13 from simonjohansson)
  • fixes for chef11 compatibility
  • fix version check in DSL condition
  • update service notifications to new format


  • Initial public release
  • Restructure entire cookbook for better reusability
  • Remove Internal/non-public dependencies
  • Fix: master/slave replication issues
  • Fix: LWRP notification method
  • Add minimal spec's for libraries
  • New: examples directory with databags and environments
  • New: configurable bag lookups for dhcp/dns bags
  • New: Group host list support
  • New: Defaults to mac address as hostname for non registered clients
  • New: Defines global defaults in default attributes

Collaborator Number Metric

8.1.3 passed this metric

Contributing File Metric

8.1.3 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Cookstyle Metric

8.1.3 passed this metric

No Binaries Metric

8.1.3 passed this metric

Testing File Metric

8.1.3 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Version Tag Metric

8.1.3 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must include a tag that matches this cookbook version number