1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2024-09-20 04:30:36 +00:00
puppet-fluentd/templates/filter.erb
sgudmand 49848b2afd Change variable names for inner loop in filter.erb
When using the module with puppet 3.8.7, ran into an issue where the variable assignment of the inner loop was overwriting the variables of the same name in the outer loop.  This was causing filter configs to be generated with an unmatched record tag.  I have simply changed the names of the variables in the inner loop of the template so that the will no longer occur.
2017-07-11 11:13:11 +02:00

14 lines
319 B
Plaintext

<filter <%= @pattern %>>
<% @config.each do |key, val| -%>
<%- if val.is_a?( Hash ) -%>
<<%= key -%>>
<%- val.each do |key2, val2| -%>
<%= key2 -%> <%= val2 %>
<%- end -%>
</<%= key %>>
<%- else -%>
<%= key -%> <%= val %>
<%- end -%>
<% end -%>
</filter>