ansible-role-rsyslog
ansible-role-rsyslog copied to clipboard
Add support for multiple remotes
Add support for multiple remotes
Description
This PR changes the forwarding rule templates to allow configuration of multiple remotes.
Changes
Removes the rsyslog_remote
variable and replaces it with rsyslog_remotes
, which is a list of maps.
Each item in this list has the following fields, as documents in defaults/main.yml
:
- selector: pattern matching logs to forward.
hostname: hostname of server to forward to.
port: port to forward to.
tcp: whether to use tcp.
All three templates (legacy default, advanced default, and standalone forwarding rules) have been modified to use these new variables. In addition, some comments were changed to be clearer and more correct.
Notes
Will break existing forwarding. This could be avoided by restoring the old variables and allowing both to be used together. If breaking backwards compatibility is a dealbreaker I can update the PR to fix that.
Also, this is a dupe of #44 but that PR breaks forwarding rules in the default config files and doesn't work with the advanced format.