diff options
author | Jeanneret Cedric <contact@internux.ch> | 2015-11-06 08:57:26 +0100 |
---|---|---|
committer | Jeanneret Cedric <contact@internux.ch> | 2015-11-06 08:57:26 +0100 |
commit | b2fcb15c7f3e54720d23a1ad2002dadd872668df (patch) | |
tree | 1f324dd54a27b7d89d4f45679e2aa4a7716a2193 /templates/subnet.conf.erb | |
parent | b5ee63a48adbea3e50300e2c0c26c575ec1b5abb (diff) | |
parent | 42f495f3525bc740ea3b2451cfedac912167f843 (diff) | |
download | puppet-dhcp-b2fcb15c7f3e54720d23a1ad2002dadd872668df.tar.gz puppet-dhcp-b2fcb15c7f3e54720d23a1ad2002dadd872668df.tar.bz2 |
Merge pull request #17 from camptocamp/failover-corrected
Failover corrected
Diffstat (limited to 'templates/subnet.conf.erb')
-rw-r--r-- | templates/subnet.conf.erb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/templates/subnet.conf.erb b/templates/subnet.conf.erb index 11f9ed4..9592a4c 100644 --- a/templates/subnet.conf.erb +++ b/templates/subnet.conf.erb @@ -19,10 +19,18 @@ subnet <%= @name %> netmask <%= _netmask %> { scope.function_validate_re([_domain_name, '^\S+$']) -%> option domain-name "<%= _domain_name %>"; <% unless @other_opts.empty? -%> - <% if @other_opts.is_a?(Array) -%> -<%= @other_opts.collect! {|i| " #{i};"}.join("\n") %> - <% else -%> +<% +if @other_opts.is_a?(Array) + @other_opts.each do |i| + if i =~ /(\{|\})/ +-%> + <%= i %> +<%- else -%> + <%= i %>; +<% end -%> +<% end -%> +<% else -%> <%= @other_opts %>; - <% end -%> +<% end -%> <% end -%> } |