Cookbooks
dhcp
documentation
Dhcp Service

dhcp_service

Back to resource list

Manage the DHCPD and DHCPD6 services.

Introduced: v7.0.0

Actions

  • :create
  • :delete
  • :start
  • :stop
  • :reload
  • :enable
  • :disable

Properties

NameTypeDefaultDescriptionAllowed Values
ip_versionSymbol:ipv4Select DHCP or DHCPv6 server to configure:ipv4, :ipv6
service_nameStringnilCustom service name
systemd_unit_contentString, HashPlatform dependantsystemd unit file content for service
config_fileString/etc/dhcp/dhcpd(6).confThe full path to the DHCP server configuration on disk
config_testTrue, FalsetruePerform configuration test before starting, restarting or reload
config_test_fail_actionSymbol:raiseAction to perform upon a configuration test failure:raise, :log

Examples

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