chef-lctp/site-cookbooks/dhcp/templates/default/dhcpd.conf.erb

19 lines
634 B
Plaintext

# dhcpd.conf for <%= @node.name %> managed by Chef. Changes will be overwritten.
default-lease-time 600;
max-lease-time 7200;
# option definitions common to all supported networks...
option domain-name <%= @node.dhcp.domain.name %>;
option domain-name-servers <%= @node.dhcp.domain.server %>;
subnet <%= @node.dhcp.subnet.prefix %> netmask <%= @node.dhcp.subnet.netmask%> {
option routers <%= @node.dhcp.subnet.gateway%>;
}
<% @node.dhcp.hosts.each do |host| -%>
host <%= host.name %> {
hardware ethernet <%= host.mac %>;
fixed-address <%= "#{host.name}.#{@node.dhcp.domain.name}" %>;
use-host-decl-names true;
}
<% end -%>