From 96fe4d9ec4f03d12a5a4c121f5a7b1ff4c73a098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Sun, 14 Apr 2024 00:27:09 +0200 Subject: [PATCH] Restrict journal size --- playbook.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/playbook.yml b/playbook.yml index 0aac497..ed45711 100644 --- a/playbook.yml +++ b/playbook.yml @@ -461,6 +461,15 @@ line: 'HandlePowerKey=suspend' become: true + - name: limit journald size + lineinfile: + path: /etc/systemd/journald.conf + regexp: '^#?SystemMaxUse=.*$' + line: 'SystemMaxUse=50M' + become: true + notify: + - restart journald + - name: create sudonopw group group: name: sudonopw @@ -537,3 +546,9 @@ mkinitcpio_cmd.rc != 0 and not (mkinitcpio_cmd.rc == 1 and "file not found: `fsck.overlay'" in mkinitcpio_cmd.stderr) + + - name: restart journald + service: + name: systemd-journald + state: restarted + become: true