aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorCédric Jeanneret <cedric.jeanneret@camptocamp.com>2010-11-05 14:48:26 +0100
committerCédric Jeanneret <cedric.jeanneret@camptocamp.com>2010-11-05 14:48:26 +0100
commit1b1650c86cc9ca0616d06721b29630747a930d0f (patch)
tree794dc7f617055a2cbe4d4a296b610417361a46d7 /templates
parent98407bfa96e8600d82abf24ef95d91a6ff911c4d (diff)
downloadpuppet-dhcp-1b1650c86cc9ca0616d06721b29630747a930d0f.tar.gz
puppet-dhcp-1b1650c86cc9ca0616d06721b29630747a930d0f.tar.bz2
(dhcp::subnet and associated tmpl) updated documentation and removed many options
I decided to remove many options of the definition, and to replace them with a single array.
Diffstat (limited to 'templates')
-rw-r--r--templates/subnet.conf.erb25
1 files changed, 8 insertions, 17 deletions
diff --git a/templates/subnet.conf.erb b/templates/subnet.conf.erb
index a0a9d29..c7c690d 100644
--- a/templates/subnet.conf.erb
+++ b/templates/subnet.conf.erb
@@ -5,35 +5,26 @@ subnet <%=name%> netmask <%=netmask%> {
<% else -%>
subnet <%=name%> netmask <%=netmask_eth0%> {
<% end -%>
-<% if routeurs -%>
- option routers <%=routeurs%>;
+<% 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 -%>
+<% else if netmask -%>
option subnet-mask <%=netmask%>;
+<% else -%>
+ option subnet-mask <%=netmask_eth0%>;
<% end -%>
- option broadcast-address <%=bcast%>;
- option domain-name-servers <%=dns%>;
+ option broadcast-address <%=broadcast%>;
<% if domain_name -%>
option domain-name "<%=domain_name%>";
<% else -%>
option domain-name "<%=domain%>";
<% end -%>
-<% if netbios_dns -%>
- option netbios-name-servers <%=netbios_dns%>;
-<% else -%>
- option netbios-name-servers <%=network_eth0%>;
-<% end -%>
-<% if deny -%>
- deny <%=deny%>;
-<% end -%>
-<% if inc -%>
include "<%=to_inc%>";
+<% if other_opts and not other_opts.empty? -%>
+<%= other_opts.collect! {|i| " #{i}" }.join(";\n") %>
<% end -%>
-<% if other_opt and not other_opt.empty? -%>
-<%= other_opt.collect! {|i| " #{i}" }.join("\n") -%>
-<% end %>
}