Compare commits

...

2 Commits

Author SHA1 Message Date
91e8739aed Merge pull request 'fix: Configure rsyslog' (#3) from rsyslogFix into master
Reviewed-on: #3
2024-04-18 19:49:53 +00:00
c800813c7b fix: Configure rsyslog 2024-04-18 21:43:59 +02:00
5 changed files with 36 additions and 0 deletions

View File

@ -28,6 +28,12 @@ $ ansible-galaxy install -fr requirements.yml
## Variables
### podman_configure_rsyslog
Désactive les messages du programme *podman* et des programmes dans les conteneurs si ils portent le nom du conteneur.
<span style="text-decoration: underline">Valeur par défaut:</span> `true` (activé, `false` pour désactiver)
### podman_containers
Définition des conteneurs à déployer.

View File

@ -1,6 +1,8 @@
---
# defaults file for podman
podman_configure_rsyslog: true
podman_containers: []
# Exemple:
# - image: docker.io/wallabag/wallabag:latest

8
handlers/main.yml Normal file
View File

@ -0,0 +1,8 @@
---
# handlers file for exim4
- name: Redémarrer rsyslog.service
ansible.builtin.systemd:
state: restarted
name: rsyslog.service
become: true

View File

@ -11,3 +11,14 @@
- systemd-container
state: present
become: true
- 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
when: podman_configure_rsyslog
become: true
notify: Redémarrer rsyslog.service

View 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 %}