fix: Configure rsyslog
This commit is contained in:
parent
1dd6ac97b9
commit
45cbf68e5c
8
handlers/main.yml
Normal file
8
handlers/main.yml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
# handlers file for exim4
|
||||
|
||||
- name: Redémarrer rsyslog.service
|
||||
ansible.builtin.systemd:
|
||||
state: restarted
|
||||
name: rsyslog.service
|
||||
become: true
|
@ -46,3 +46,13 @@
|
||||
scope: user
|
||||
become: true
|
||||
become_user: "{{ container_user }}"
|
||||
|
||||
- name: Déployer la configuration de rsyslog
|
||||
ansible.builtin.template:
|
||||
src: rsyslog.j2
|
||||
dest: /etc/rsyslog.d/10-podman.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,g=r,o=r
|
||||
become: true
|
||||
notify: Redémarrer rsyslog.service
|
||||
|
9
templates/rsyslog.conf
Normal file
9
templates/rsyslog.conf
Normal file
@ -0,0 +1,9 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
# Don't log podman
|
||||
:programname, contains, "podman" stop
|
||||
|
||||
# Don't log progams inside podman container
|
||||
{% for container in podman_containers %}
|
||||
:programname, contains, "{{ container.name }}" stop
|
||||
{% %}
|
Loading…
Reference in New Issue
Block a user