aboutsummaryrefslogtreecommitdiff
path: root/templates/subnet.conf.erb
blob: c7c690dd4bbdf8d0b51ded7fa3e6a965f7ecedec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File managed by puppet

<% if netmask -%>
subnet <%=name%> netmask <%=netmask%> {
<% else -%>
subnet <%=name%> netmask <%=netmask_eth0%> {
<% end -%>
<% if routers and not routers.empty? -%>
  option routers  routers.collect! {|i| "#{i}" }.join(",");
<% else -%>
  option routers <%=network_eth0%>;
<% end -%>
<% if subnet_mask -%>
  option subnet-mask <%=subnet_mask%>;
<% else if netmask -%>
  option subnet-mask <%=netmask%>;
<% else -%>
  option subnet-mask <%=netmask_eth0%>;
<% end -%>
  option broadcast-address <%=broadcast%>;
<% if domain_name -%>
  option domain-name "<%=domain_name%>";
<% else -%>
  option domain-name "<%=domain%>";
<% end -%>
  include "<%=to_inc%>";
<% if other_opts and not other_opts.empty? -%>
<%= other_opts.collect! {|i| "  #{i}" }.join(";\n") %>
<% end -%>
}