From 29d229e898e5b29d4177539653c0e041988a7968 Mon Sep 17 00:00:00 2001 From: Benjamin Bernard Date: Wed, 5 Oct 2022 14:30:48 +0200 Subject: [PATCH] Add allowed module omrelp --- tasks/assert.yml | 2 +- templates/advanced_rsyslog.conf.j2 | 3 +++ templates/legacy_rsyslog.conf.j2 | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tasks/assert.yml b/tasks/assert.yml index 0a401bd..0f05f3c 100644 --- a/tasks/assert.yml +++ b/tasks/assert.yml @@ -56,7 +56,7 @@ that: - item is defined - item is string - - item in [ "imuxsock", "imjournal", "imklog", "immark", "imfile" ] + - item in [ "imuxsock", "imjournal", "imklog", "immark", "imfile", "omrelp" ] quiet: yes loop: "{{ rsyslog_mods }}" diff --git a/templates/advanced_rsyslog.conf.j2 b/templates/advanced_rsyslog.conf.j2 index 9f2f812..3e56f78 100644 --- a/templates/advanced_rsyslog.conf.j2 +++ b/templates/advanced_rsyslog.conf.j2 @@ -35,6 +35,9 @@ {{ '' if rsyslog_receiver else '#' }}module(load="imtcp") # needs to be done just once {{ '' if rsyslog_receiver else '#' }}input(type="imtcp" port="514") +# supports sending syslog messages over the reliable RELP protocol +{{ '' if 'omrelp' in rsyslog_mods else '#' }}module(load="omrelp") + ########################### #### GLOBAL DIRECTIVES #### ########################### diff --git a/templates/legacy_rsyslog.conf.j2 b/templates/legacy_rsyslog.conf.j2 index 4fb1b64..8199be5 100644 --- a/templates/legacy_rsyslog.conf.j2 +++ b/templates/legacy_rsyslog.conf.j2 @@ -15,6 +15,7 @@ {{ '#' if not 'imklog' in rsyslog_mods else '' }}$ModLoad imklog # provides kernel logging support {{ '#' if not 'immark' in rsyslog_mods else '' }}$ModLoad immark # provides --MARK-- message capability {{ '#' if not 'imfile' in rsyslog_mods else '' }}$ModLoad imfile # provides access to specific log file +{{ '#' if not 'omrelp' in rsyslog_mods else '' }}$ModLoad omrelp # supports sending syslog messages over the reliable RELP protocol # provides UDP syslog reception {{ '' if rsyslog_receiver else '#' }}$ModLoad imudp