chef-lctp/site-cookbooks/dhcp/recipes/default.rb

26 lines
544 B
Ruby

include_recipe "apt"
package "isc-dhcp-server"
template "/etc/dhcp/dhcpd.conf" do
owner "root"
group "root"
mode "0664"
source "dhcpd.conf.erb"
notifies :reload, "service[isc-dhcp-server]"
end
template "/etc/default/isc-dhcp-server" do
owner "root"
group "root"
mode "0664"
source "isc-dhcp-server.erb"
notifies :reload, "service[isc-dhcp-server]"
end
service "isc-dhcp-server" do
provider Chef::Provider::Service::Upstart
action [:enable, :start]
supports status: true, start: true, stop: true, restart: true
end