fix: various rsyslog deploy problems

This commit is contained in:
2023-01-03 20:31:49 +01:00
parent b52b520163
commit 827b20a57b
2 changed files with 8 additions and 2 deletions

View File

@@ -2,7 +2,6 @@
apt:
pkg:
- rsyslog
- rsyslog-pgsql
state: present
- name: Install rsyslog psql on master
@@ -12,6 +11,13 @@
state: present
when: monitoring_master
- name: Ensure no rsyslog psql on non-master
apt:
pkg:
- rsyslog-pgsql
state: absent
when: not monitoring_master
- name: Rsyslog Main config
template:
src: rsyslog.conf.j2

View File

@@ -87,7 +87,7 @@ mail.err /var/log/mail.err
cron,daemon.none;\
mail.none -/var/log/messages
{% if not monitoring_master %}
{% if monitoring_master %}
$CreateDirs on
$template RemoteLogs,"/var/log/rsyslog/%HOSTNAME%/%PROGRAMNAME%.log"
*.* ?RemoteLogs