Huge role refactoring/cleanup. Other commits will propably follow. Because some bugs will exist. Still important for longrun and also for auto docs/help/slideshow generation

This commit is contained in:
2025-07-08 23:43:13 +02:00
parent 6b87a049d4
commit 563d5fd528
1242 changed files with 2301 additions and 1355 deletions

View File

@@ -0,0 +1,32 @@
# Journalctl
This Ansible role manages the configuration of `systemd-journald` on target hosts.
## Description
- Copies a customized `journald.conf` to `/etc/systemd/journald.conf`
- Ensures log retention for one week
- Restarts the `systemd-journald` service when configuration changes
- Supports live log streaming via `journalctl -f`
## Overview
1. **Template deployment**
The role places your `journald.conf.j2` template into `/etc/systemd/journald.conf`.
2. **Service handler**
On change, it notifies a handler to restart `systemd-journald`.
3. **Monitoring**
You can follow logs in real time with `journalctl -f`.
## Features
- Customizable retention and runtime limits
- Seamless restarts on config update
- Integration with `monitor-bot-journalctl` for downstream monitoring
## Usage
```yaml
- hosts: all
roles:
- role: core-journalctl

View File

@@ -0,0 +1,3 @@
---
- name: restart systemd-journald
service: name=systemd-journald state=restarted

View File

@@ -0,0 +1,20 @@
---
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: "Configure and manage systemd-journald settings"
license: "CyMaIS NonCommercial License (CNCL)"
license_url: "https://s.veen.world/cncl"
company: |
Kevin Veen-Birkenbach
Consulting & Coaching Solutions
https://www.veen.world
galaxy_tags:
- system
- logging
- journald
repository: "https://github.com/kevinveenbirkenbach/cymais"
issue_tracker_url: "https://github.com/kevinveenbirkenbach/cymais/issues"
documentation: "https://github.com/kevinveenbirkenbach/cymais/roles/core-journalctl"
run_after: []
dependencies:
- monitor-bot-journalctl

View File

@@ -0,0 +1,5 @@
- name: copy journald.conf
template:
src: templates/journald.conf.j2
dest: /etc/systemd/journald.conf
notify: restart systemd-journald

View File

@@ -0,0 +1,47 @@
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See journald.conf(5) for details.
[Journal]
#Storage=auto
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
#RateLimitIntervalSec=30s
#RateLimitBurst=10000
#SystemMaxUse=
#SystemKeepFree=
#SystemMaxFileSize=
#SystemMaxFiles=100
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#RuntimeMaxFiles=100
# Store logs for one week:
MaxRetentionSec=604800
#MaxFileSec=1month
#ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg
#LineMax=48K
#ReadKMsg=yes
#Audit=yes