fix: Configure rsyslog
This commit is contained in:
parent
1dd6ac97b9
commit
d4b11cc84c
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
|
scope: user
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ container_user }}"
|
become_user: "{{ container_user }}"
|
||||||
|
|
||||||
|
- name: Déployer la configuration de rsyslog
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: templates/rsyslog.conf.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.j2
Normal file
9
templates/rsyslog.conf.j2
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
|
||||||
|
{% endfor %}
|
Loading…
Reference in New Issue
Block a user