evolinux-base: Limit journald to 1 day
This commit is contained in:
parent
0e1fe0e81f
commit
fe369257ed
|
@ -175,6 +175,7 @@ evolinux_logs_disable_logrotate_rsyslog: True
|
||||||
evolinux_logs_rsyslog_conf: True
|
evolinux_logs_rsyslog_conf: True
|
||||||
evolinux_logrotate_dateformat: "-%Y%m%d%H"
|
evolinux_logrotate_dateformat: "-%Y%m%d%H"
|
||||||
evolinux_logs_disable_logcheck_journald: True
|
evolinux_logs_disable_logcheck_journald: True
|
||||||
|
evolinux_logs_journald_conf: True
|
||||||
|
|
||||||
# default www
|
# default www
|
||||||
|
|
||||||
|
|
|
@ -79,3 +79,7 @@
|
||||||
name: log2mail
|
name: log2mail
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
- name: restart systemd-journald
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: systemd-journald.service
|
||||||
|
state: restarted
|
||||||
|
|
|
@ -69,4 +69,20 @@
|
||||||
regexp: "^journal"
|
regexp: "^journal"
|
||||||
when: evolinux_logs_disable_logcheck_journald | bool
|
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
|
- ansible.builtin.meta: flush_handlers
|
||||||
|
|
Loading…
Reference in a new issue