From f6f27ff950647adad857b01a7129eeb06f8e32b2 Mon Sep 17 00:00:00 2001 From: Niklas Yann Wettengel Date: Thu, 12 Apr 2018 00:19:20 +0200 Subject: limit log to 1 day --- roles/configure_journald/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'roles/configure_journald/tasks/main.yml') diff --git a/roles/configure_journald/tasks/main.yml b/roles/configure_journald/tasks/main.yml index a9976d6..ff4b2b0 100644 --- a/roles/configure_journald/tasks/main.yml +++ b/roles/configure_journald/tasks/main.yml @@ -5,3 +5,10 @@ regexp: '^#?Storage=' line: 'Storage=volatile' notify: restart systemd-journald + +- name: save log for max 1 day + lineinfile: + path: /etc/systemd/journald.conf + regexp: '^#?MaxRetentionSec=' + line: 'MaxRetentionSec=1day' + notify: restart systemd-journald -- cgit v1.2.3-54-g00ecf