summaryrefslogtreecommitdiff
path: root/roles/configure_journald
diff options
context:
space:
mode:
Diffstat (limited to 'roles/configure_journald')
-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