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
default['rsyslog']['allow_non_local'] = false
default['rsyslog']['custom_remote'] = []
default['rsyslog']['additional_directives'] = {}
default['rsyslog']['templates'] = {}
default['rsyslog']['templates'] = %w()
# The most likely platform-specific attributes
default['rsyslog']['service_name'] = 'rsyslog'
......
......@@ -81,10 +81,10 @@ $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
#
# Additional Log templates
#
<% if node['rsyslog']['templates'] -%>
<% node['rsyslog']['templates'].each_pair do |k,v| %>
$<%= k %> <%= v %>
<% end %>
<% if node['rsyslog']['templates'] && !node['rsyslog']['templates'].empty? -%>
<% [*node['rsyslog']['templates']].each do |template| %>
$Template <%= template %>
<% end %>
<% end %>
# Filter duplicated messages
$RepeatedMsgReduction <%= node['rsyslog']['repeated_msg_reduction'] %>
......
Markdown is supported
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