Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled custom 35-server-per-host.conf templates #174

Merged
merged 4 commits into from
Nov 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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