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

adding ability to set multiple log templates

parent 48933b7e
...@@ -53,6 +53,7 @@ default['rsyslog']['use_local_ipv4'] = false ...@@ -53,6 +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'] = {}
# The most likely platform-specific attributes # The most likely platform-specific attributes
default['rsyslog']['service_name'] = 'rsyslog' default['rsyslog']['service_name'] = 'rsyslog'
......
...@@ -78,6 +78,14 @@ $ActionFileDefaultTemplate <%= node["rsyslog"]["default_file_template"] %> ...@@ -78,6 +78,14 @@ $ActionFileDefaultTemplate <%= node["rsyslog"]["default_file_template"] %>
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
<% end -%> <% end -%>
#
# Additional Log templates
#
<% if node['rsyslog']['templates'] -%>
<% node['rsyslog']['templates'].each_pair do |k,v| %>
$<%= k %> <%= v %>
<% end %>
# Filter duplicated messages # Filter duplicated messages
$RepeatedMsgReduction <%= node['rsyslog']['repeated_msg_reduction'] %> $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