linux-system-roles.journald

Journald

ansible-lint.yml ansible-test.yml markdownlint.yml tft.yml tft_citest_bad.yml woke.yml

This role makes it simple to set up the systemd-journald logging service.

Requirements

See below

Collection Requirements

If you want to manage rpm-ostree systems using this role, you need to install some extra collections. You can do this by running:

ansible-galaxy collection install -vv -r meta/collection-requirements.yml

Role Variables

This role allows system administrators to configure basic settings for systemd-journald using the following variables:

  • journald_persistent - a boolean that determines where journald saves log files. Set to true to store logs on disk in /var/log/journal/. By default, it is false, meaning it uses volatile storage.

NOTE: The following settings work for both persistent and volatile modes unless stated otherwise.

  • journald_max_disk_size - an integer (in megabytes) that limits how much disk space journal files can use before they are deleted. No default value is set, so the role follows the sizing rules in man 5 journald.conf.

  • journald_max_files - an integer that sets the maximum number of journal files to keep while following the max disk size rules. No default value is provided.

  • journald_max_file_size - an integer (in megabytes) that indicates the largest size of a single journal file. No default configuration is established by the role.

  • journald_per_user - a boolean that allows journald to keep log data separate for each user, enabling unprivileged users to read logs from their own services. Defaults to true. Note that per-user journal files are only available if journald_persistent: true.

  • journald_compression - a boolean that tells journald to compress data objects larger than the default 512 bytes. Defaults to true.

  • journald_sync_interval - an integer (in minutes) that configures how often journald saves the current journal file to disk. The role doesn't change the current value by default. This is only relevant for journald_persistent: true. You will see a warning if set otherwise.

  • journald_forward_to_syslog - a boolean that controls whether log messages received by journald should be sent to a traditional syslog daemon. Defaults to false.

  • journald_rate_limit_interval_sec - an integer (in seconds) that sets the time frame in which only journald_rate_limit_burst messages are processed. For more info, see man 5 journald.conf.

  • journald_rate_limit_burst - an integer that sets the maximum number of messages from a service that can be processed within the time defined by journald_rate_limit_interval_sec. For more info, see man 5 journald.conf.

Example Playbook

- hosts: all
  vars:
    journald_persistent: true
    journald_max_disk_size: 2048
    journald_per_user: true
    journald_sync_interval: 1
  roles:
    - linux-system-roles.journald

rpm-ostree

See README-ostree.md

License

MIT

Author Information

Michal Sekletar

Installa
ansible-galaxy install linux-system-roles.journald
Licenza
mit
Download
87.3k
Proprietario