mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-10 07:08:33 +01:00
feat: unify rsyslog client/master
This commit is contained in:
35
roles/rsyslog/tasks/main.yaml
Normal file
35
roles/rsyslog/tasks/main.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
- name: Install Dependecies
|
||||
apt:
|
||||
pkg:
|
||||
- rsyslog
|
||||
- rsyslog-pgsql
|
||||
state: present
|
||||
|
||||
- name: Install rsyslog psql on master
|
||||
apt:
|
||||
pkg:
|
||||
- rsyslog-pgsql
|
||||
state: present
|
||||
when: monitoring_master
|
||||
|
||||
- name: Rsyslog Main config
|
||||
template:
|
||||
src: rsyslog.conf.j2
|
||||
dest: /etc/rsyslog.conf
|
||||
mode: 0755
|
||||
notify:
|
||||
- restart rsyslog
|
||||
|
||||
- name: Rsyslog Database config
|
||||
template:
|
||||
src: pgsql.conf.j2
|
||||
dest: /etc/rsyslog.d/pgsql.conf
|
||||
mode: 0755
|
||||
notify:
|
||||
- restart rsyslog
|
||||
|
||||
- name: Enable and start nsca-ng
|
||||
systemd:
|
||||
name: rsyslog.service
|
||||
state: started
|
||||
enabled: yes
|
||||
Reference in New Issue
Block a user