Skip to content

Commit

Permalink
Merge pull request #174 from axl89/feature-rsyslog-server-flags
Browse files Browse the repository at this point in the history
Enabled custom  35-server-per-host.conf templates
  • Loading branch information
ramereth authored Nov 23, 2020
2 parents 3079220 + 62dfc70 commit 0352f6c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This file is used to list changes made in each version of the rsyslog cookbook.

## Unreleased

- Enabled custom templates for rsyslog `35-server-per-host.conf` file.

## 7.2.1 - *2020-11-23*

- Fixed a bug during the release of 7.2.0
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ See `attributes/default.rb` for default values.
- `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']['default_conf_file']` - If false it skips the creation of default configuration file 50-default.conf
- `node['rsyslog']['server_per_host_template']` - Template to use in the `rsyslog::server` recipe when creating the `35-server-per-host.conf` file
- `node['rsyslog']['server_per_host_cookbook']` - Cookbook name to get the `node['rsyslog']['server_per_host_template']` template from

## Recipes

Expand Down
2 changes: 2 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
default['rsyslog']['additional_directives'] = {}
default['rsyslog']['templates'] = %w()
default['rsyslog']['default_conf_file'] = true
default['rsyslog']['server_per_host_template'] = '35-server-per-host.conf.erb'
default['rsyslog']['server_per_host_cookbook'] = 'rsyslog'

# The most likely platform-specific attributes
default['rsyslog']['package_name'] = 'rsyslog'
Expand Down
3 changes: 2 additions & 1 deletion recipes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
end

template "#{node['rsyslog']['config_prefix']}/rsyslog.d/35-server-per-host.conf" do
source '35-server-per-host.conf.erb'
cookbook node['rsyslog']['server_per_host_cookbook']
source node['rsyslog']['server_per_host_template']
owner node['rsyslog']['config_files']['owner']
group node['rsyslog']['config_files']['group']
mode node['rsyslog']['config_files']['mode']
Expand Down

0 comments on commit 0352f6c

Please sign in to comment.