aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorRaphaël Pinson <raphael.pinson@camptocamp.com>2013-04-12 11:10:45 +0200
committerRaphaël Pinson <raphael.pinson@camptocamp.com>2013-04-12 11:10:45 +0200
commitb35e1322d0a791ab22cb2c385ec913492c75026d (patch)
tree74cc5d0be13ef9110665741de1a873f84e98e9bd /templates
parent558df46dc9bec98c6c90719d9aed11ec7a338411 (diff)
downloadpuppet-dhcp-b35e1322d0a791ab22cb2c385ec913492c75026d.tar.gz
puppet-dhcp-b35e1322d0a791ab22cb2c385ec913492c75026d.tar.bz2
Rename dhcp::shared-network to dhcp::shared_network, add specs
Diffstat (limited to 'templates')
-rw-r--r--templates/shared-network.erb9
1 files changed, 6 insertions, 3 deletions
diff --git a/templates/shared-network.erb b/templates/shared-network.erb
index 99a7aca..407106a 100644
--- a/templates/shared-network.erb
+++ b/templates/shared-network.erb
@@ -1,6 +1,9 @@
-#### dhcp::shared-network <%= name %>
-shared-network <%= name %> {
-<% subnets.each do |subnet| -%>
+#### dhcp::shared_network <%= @name %>
+shared-network <%= @name %> {
+<% @subnets.each do |subnet|
+ scope.function_validate_string([subnet])
+ scope.function_validate_re([subnet, '^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}$'])
+-%>
include "<%= scope.lookupvar("dhcp::params::config_dir") %>/subnets/<%= subnet %>.conf";
<% end -%>
}