mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 10:25:39 +00:00
set max size for systemd journal
My /var/log/journal was 2.9GB. I'm not sure what a good limit is, but it certainly is less than that...
This commit is contained in:
parent
f2ae6451e8
commit
8da136c5db
4 changed files with 18 additions and 0 deletions
|
|
@ -169,3 +169,6 @@ cryptshot:
|
|||
interval: 6
|
||||
- level: monthly
|
||||
interval: 3
|
||||
|
||||
journal:
|
||||
max_size: 500M
|
||||
|
|
|
|||
11
roles/base/tasks/journal.yml
Normal file
11
roles/base/tasks/journal.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
- name: Create journal config directory
|
||||
file: path=/etc/systemd/journald.conf.d state=directory
|
||||
tags:
|
||||
- journal
|
||||
|
||||
- name: Push journal max size config
|
||||
template: src=00-journal-size.conf.j2 dest=/etc/systemd/journald.conf.d/00-journal-size.conf.j2
|
||||
when: journal is defined and journal.max_size is defined
|
||||
tags:
|
||||
- journal
|
||||
|
|
@ -13,3 +13,4 @@
|
|||
- include: user.yml
|
||||
- include: sudo.yml
|
||||
- include: packages.yml
|
||||
- include: journal.yml
|
||||
|
|
|
|||
3
roles/base/templates/00-journal-size.conf.j2
Normal file
3
roles/base/templates/00-journal-size.conf.j2
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# {{ ansible_managed }}
|
||||
[Journal]
|
||||
SystemMaxUse={{ journald.max_size }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue