JGoutin / ansible_home

A collection of Ansible roles for home free software self-hosting.
https://galaxy.ansible.com/jgoutin/home
GNU General Public License v3.0
31 stars 6 forks source link

common: Configure journal max size #57

Closed JGoutin closed 1 year ago

JGoutin commented 1 year ago

Allow to configure journald disk and memory usage:

[Journal]
SystemMaxUse={{ common_journal_disk_max_size }}
RuntimeMaxUse={{ common_journal_memory_max_size }}
- name: Ensure journald configuration directory is present
  ansible.builtin.file:
    path: /etc/systemd/journald.conf.d
    state: directory
    mode: 0640

- name: Ensure journald is configured
  ansible.builtin.template:
    src: journald-max-use.conf.j2
    dest: /etc/systemd/journald.conf.d/max-use.conf
    mode: 0600