summaryrefslogtreecommitdiff
path: root/roles/configure_journald/tasks/main.yml
diff options
context:
space:
mode:
authorNiklas Yann Wettengel <niyawe@niyawe.de>2018-04-12 00:19:20 +0200
committerNiklas Yann Wettengel <niyawe@niyawe.de>2018-04-12 00:19:20 +0200
commitf6f27ff950647adad857b01a7129eeb06f8e32b2 (patch)
treeedd664012bbb2e23b17e06c27bfe68a733a8753e /roles/configure_journald/tasks/main.yml
parenteedbf0f2beb5dd8c18678591f3cc82313d3d6d8c (diff)
limit log to 1 day
Diffstat (limited to 'roles/configure_journald/tasks/main.yml')
-rw-r--r--roles/configure_journald/tasks/main.yml7
1 files changed, 7 insertions, 0 deletions
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