Compare commits
2 Commits
1dd6ac97b9
...
91e8739aed
Author | SHA1 | Date | |
---|---|---|---|
91e8739aed | |||
c800813c7b |
@ -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.
|
||||
|
@ -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
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
|
@ -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
|
||||
|
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