diff options
author | Raphaël Pinson <raphael.pinson@camptocamp.com> | 2013-04-12 11:10:45 +0200 |
---|---|---|
committer | Raphaël Pinson <raphael.pinson@camptocamp.com> | 2013-04-12 11:10:45 +0200 |
commit | b35e1322d0a791ab22cb2c385ec913492c75026d (patch) | |
tree | 74cc5d0be13ef9110665741de1a873f84e98e9bd /templates | |
parent | 558df46dc9bec98c6c90719d9aed11ec7a338411 (diff) | |
download | puppet-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.erb | 9 |
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 -%> } |