evolinux-base: Limit journald to 1 day

This commit is contained in:
Brice Waegeneire 2023-08-23 15:11:39 +02:00
parent 0e1fe0e81f
commit fe369257ed
3 changed files with 21 additions and 0 deletions

View file

@ -175,6 +175,7 @@ evolinux_logs_disable_logrotate_rsyslog: True
evolinux_logs_rsyslog_conf: True
evolinux_logrotate_dateformat: "-%Y%m%d%H"
evolinux_logs_disable_logcheck_journald: True
evolinux_logs_journald_conf: True
# default www

View file

@ -79,3 +79,7 @@
name: log2mail
state: restarted
- name: restart systemd-journald
ansible.builtin.service:
name: systemd-journald.service
state: restarted

View file

@ -69,4 +69,20 @@
regexp: "^journal"
when: evolinux_logs_disable_logcheck_journald | bool
# Journald
- name: /etc/systemd/journald.conf.d/ is present
ansible.builtin.file:
path: /etc/systemd/journald.conf.d/
state: directory
mode: "0755"
when: evolinux_logs_journald_conf | bool
- name: Copy journald.conf
ansible.builtin.copy:
src: logs/journald.conf
dest: /etc/systemd/journald.conf.d/00-evolinux-default.conf
mode: "0644"
notify: restart systemd-journald
when: evolinux_logs_journald_conf | bool
- ansible.builtin.meta: flush_handlers