Unverified Commit 84b8a3ea authored by Tim Smith's avatar Tim Smith Committed by GitHub

Merge pull request #133 from jfwm2/50-default-optional

Optional creation of default configuration file 50-default.conf
parents 551d5239 0ad01e4f
...@@ -72,6 +72,7 @@ See `attributes/default.rb` for default values. ...@@ -72,6 +72,7 @@ See `attributes/default.rb` for default values.
- `node['rsyslog']['custom_remote']` - Array of hashes for configuring custom remote server targets - `node['rsyslog']['custom_remote']` - Array of hashes for configuring custom remote server targets
- `node['rsyslog']['additional_directives']` - Hash of additional directives and their values to place in the main rsyslog config file - `node['rsyslog']['additional_directives']` - Hash of additional directives and their values to place in the main rsyslog config file
- `node['rsyslog']['local_host_name']` - permits to overwrite the system hostname with the one specified in the directive - `node['rsyslog']['local_host_name']` - permits to overwrite the system hostname with the one specified in the directive
- `node['rsyslog']['default_conf_file']` - If false it skips the creation of default configuration file 50-default.conf
## Recipes ## Recipes
......
...@@ -54,6 +54,7 @@ default['rsyslog']['allow_non_local'] = false ...@@ -54,6 +54,7 @@ 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'] = %w() default['rsyslog']['templates'] = %w()
default['rsyslog']['default_conf_file'] = true
# The most likely platform-specific attributes # The most likely platform-specific attributes
default['rsyslog']['package_name'] = 'rsyslog' default['rsyslog']['package_name'] = 'rsyslog'
......
...@@ -61,7 +61,7 @@ template "#{node['rsyslog']['config_prefix']}/rsyslog.d/50-default.conf" do ...@@ -61,7 +61,7 @@ template "#{node['rsyslog']['config_prefix']}/rsyslog.d/50-default.conf" do
mode node['rsyslog']['config_files']['mode'] mode node['rsyslog']['config_files']['mode']
notifies :run, 'execute[validate_config]' notifies :run, 'execute[validate_config]'
notifies :restart, "service[#{node['rsyslog']['service_name']}]" notifies :restart, "service[#{node['rsyslog']['service_name']}]"
end end unless node['rsyslog']['default_conf_file'] == false
# syslog needs to be stopped before rsyslog can be started on RHEL versions before 6.0 # syslog needs to be stopped before rsyslog can be started on RHEL versions before 6.0
if platform_family?('rhel') && node['platform_version'].to_i < 6 if platform_family?('rhel') && node['platform_version'].to_i < 6
......
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