Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set lower limit for journald logs #898

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading