diff options
author | Cédric Jeanneret <cedric.jeanneret@camptocamp.com> | 2015-11-05 08:56:45 +0100 |
---|---|---|
committer | Cédric Jeanneret <cedric.jeanneret@camptocamp.com> | 2015-11-06 08:43:31 +0100 |
commit | 8c46b5c955e128e8049ce578d2101327a9c0a37f (patch) | |
tree | 275c580eec7c7479f47c9b5695f90a381385650c /templates/subnet.conf.erb | |
parent | 24d4dfa1c2256db068b51115828bbc12e247d7f2 (diff) | |
download | puppet-dhcp-8c46b5c955e128e8049ce578d2101327a9c0a37f.tar.gz puppet-dhcp-8c46b5c955e128e8049ce578d2101327a9c0a37f.tar.bz2 |
Do not add blindy the semi-colon
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 -%> } |