Commit e78cd633 authored by Richard Mcleod's avatar Richard Mcleod
Browse files

changed templates config to use an array

parent 0a3f7821
...@@ -53,7 +53,7 @@ default['rsyslog']['use_local_ipv4'] = false ...@@ -53,7 +53,7 @@ default['rsyslog']['use_local_ipv4'] = false
default['rsyslog']['allow_non_local'] = false default['rsyslog']['allow_non_local'] = false
default['rsyslog']['custom_remote'] = [] default['rsyslog']['custom_remote'] = []
default['rsyslog']['additional_directives'] = {} default['rsyslog']['additional_directives'] = {}
default['rsyslog']['templates'] = {} default['rsyslog']['templates'] = %w()
# The most likely platform-specific attributes # The most likely platform-specific attributes
default['rsyslog']['service_name'] = 'rsyslog' default['rsyslog']['service_name'] = 'rsyslog'
......
...@@ -81,10 +81,10 @@ $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat ...@@ -81,10 +81,10 @@ $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
# #
# Additional Log templates # Additional Log templates
# #
<% if node['rsyslog']['templates'] -%> <% if node['rsyslog']['templates'] && !node['rsyslog']['templates'].empty? -%>
<% node['rsyslog']['templates'].each_pair do |k,v| %> <% [*node['rsyslog']['templates']].each do |template| %>
$<%= k %> <%= v %> $Template <%= template %>
<% end %> <% end %>
<% end %> <% end %>
# Filter duplicated messages # Filter duplicated messages
$RepeatedMsgReduction <%= node['rsyslog']['repeated_msg_reduction'] %> $RepeatedMsgReduction <%= node['rsyslog']['repeated_msg_reduction'] %>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment