Skip to content

Commit

Permalink
Set lower limit for journald logs
Browse files Browse the repository at this point in the history
To avoid hard drive filling up.

Dunno if it was a problem before, but it was easy to copy from another project.
  • Loading branch information
dacook committed Oct 5, 2023
1 parent feac97e commit 379b4b0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions playbooks/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
- role: app_user # Create unprivileged user to run the app
tags: app_user

- role: config # System config to help things run smoothly
tags: config

- role: common # Install common apps and libraries, and setup shell.
tags: common

Expand Down
1 change: 1 addition & 0 deletions roles/config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
General system config to keep things running smoothly.
4 changes: 4 additions & 0 deletions roles/config/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
- name: Restart journald
service: name=systemd-journald state=restarted
become: yes
8 changes: 8 additions & 0 deletions roles/config/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- name: "Set journal log size limit" # to avoid hard drive filling up!
lineinfile:
path: /etc/systemd/journald.conf
regexp: '^#\s*SystemMaxUse='
line: 'SystemMaxUse=100M'
notify: Restart journald
become: yes

0 comments on commit 379b4b0

Please sign in to comment.