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

19 lines
634 B
Plaintext
Raw Normal View History

2014-01-21 22:11:25 +00:00
# dhcpd.conf for <%= @node.name %> managed by Chef. Changes will be overwritten.
2014-01-19 14:34:01 +00:00
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 %>;
2014-01-21 22:11:25 +00:00
subnet <%= @node.dhcp.subnet.prefix %> netmask <%= @node.dhcp.subnet.netmask%> {
option routers <%= @node.dhcp.subnet.gateway%>;
}
2014-01-19 14:34:01 +00:00
<% @node.dhcp.hosts.each do |host| -%>
2014-01-21 22:11:25 +00:00
host <%= host.name %> {
hardware ethernet <%= host.mac %>;
fixed-address <%= "#{host.name}.#{@node.dhcp.domain.name}" %>;
use-host-decl-names true;
}
2014-01-19 14:34:01 +00:00
<% end -%>