Commit 73d0759c authored by Tim Smith's avatar Tim Smith
Browse files

Create an attribute for the working directory

This allows it to be changed per platform (RHEL vs Debian)
parent c7584368
......@@ -23,6 +23,7 @@ Attributes
See `attributes/default.rb` for default values.
* `node['rsyslog']['log_dir']` - If the node is an rsyslog server, this specifies the directory where the logs should be stored.
* `node['rsyslog']['working_dir']` - The temporary working directory where messages are buffered
* `node['rsyslog']['server']` - Determined automaticaly and set to true on the server.
* `node['rsyslog']['server_ip']` - If not defined then search will be used to determine rsyslog server. Default is `nil`. This can be a string or an array.
* `node['rsyslog']['server_search']` - Specify the criteria for the server search operation. Default is `role:loghost`.
......
......@@ -18,6 +18,7 @@
#
default['rsyslog']['log_dir'] = '/srv/rsyslog'
default['rsyslog']['working_dir'] = '/var/spool/rsyslog'
default['rsyslog']['server'] = false
default['rsyslog']['use_relp'] = false
default['rsyslog']['relp_port'] = 20_514
......
......@@ -31,7 +31,7 @@ directory "#{node['rsyslog']['config_prefix']}/rsyslog.d" do
mode '0755'
end
directory '/var/spool/rsyslog' do
directory node['rsyslog']['working_dir'] do
owner 'root'
group 'root'
mode '0755'
......
......@@ -72,7 +72,7 @@ $RepeatedMsgReduction <%= node['rsyslog']['repeated_msg_reduction'] %>
#
# Set temporary directory to buffer syslog queue
#
$WorkDirectory /var/spool/rsyslog
$WorkDirectory <%= node['rsyslog']['working_dir'] %>
#
# Set the default permissions for all log files.
......
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