From 38722922b2db606e013071351cb0a5108a7a3263 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de>
Date: Fri, 21 Mar 2025 09:12:37 +0100
Subject: [PATCH] fix: write journald config to correct files

---
 tasks/configure_persistent_journald_logging.yml | 3 ++-
 tasks/main.yml                                  | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tasks/configure_persistent_journald_logging.yml b/tasks/configure_persistent_journald_logging.yml
index 26a4b57..ac53d3a 100644
--- a/tasks/configure_persistent_journald_logging.yml
+++ b/tasks/configure_persistent_journald_logging.yml
@@ -2,12 +2,13 @@
 # Documentation: https://www.freedesktop.org/software/systemd/man/journald.conf.html
 - name: configure journald
   ansible.builtin.blockinfile:
-    path: "/etc/systemd/journald.conf.d/persistence.conf"
+    path: "/etc/systemd/journald.conf.d/{{ item.path }}"
     owner: "root"
     group: "root"
     mode: "0644"
     create: "true"
     state: present
+    block: "{{ item.block }}"
   loop:
     - path: "log_retention.conf"
       block: |
diff --git a/tasks/main.yml b/tasks/main.yml
index 03069c0..52bc0e6 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -92,7 +92,7 @@
 
 - name: persistentes Journalctl-Logging einrichten
   ansible.builtin.import_tasks: "configure_persistent_journald_logging.yml"
-  tags: [log]
+  tags: [journal, journald, journals, journalctl, log, logs, logging, syslog]
 
 - name: Needrestart installieren
   ansible.builtin.import_tasks: "install_needrestart.yml"
-- 
GitLab