Skip to content

Commit

Permalink
Merge pull request #898 from dacook/journald-SystemMaxUse
Browse files Browse the repository at this point in the history
Set lower limit for journald logs
  • Loading branch information
mkllnk authored Oct 5, 2023
2 parents feac97e + 379b4b0 commit a73c77e
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 a73c77e

Please sign in to comment.