From 78d78b14dde00a9f2f72306378de3d53a4be13e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de>
Date: Fri, 14 Apr 2023 14:56:51 +0200
Subject: [PATCH] fix: remove unnecessary tasks to move old logs, templates
 et.al. had already been removed

---
 tasks/install_move_logs.yml | 45 -------------------------------------
 tasks/main.yml              |  4 ----
 2 files changed, 49 deletions(-)
 delete mode 100644 tasks/install_move_logs.yml

diff --git a/tasks/install_move_logs.yml b/tasks/install_move_logs.yml
deleted file mode 100644
index 15bf060..0000000
--- a/tasks/install_move_logs.yml
+++ /dev/null
@@ -1,45 +0,0 @@
----
-- name: create SystemD unit directory
-  ansible.builtin.file:
-    path: "/usr/local/lib/systemd/system/"
-    state: directory
-    mode: "0750"
-
-- name: install timer and script for moving old logs to archive
-  ansible.builtin.copy:
-    src: "{{ item.path }}"
-    dest: "/{{ item.path }}"
-    mode: "{{ item.mode }}"
-    owner: "{{ item.owner | default('root') }}"
-    group: "{{ item.group | default('root') }}"
-  loop:
-    - path: "usr/local/lib/systemd/system/move_old_logs.timer"
-      mode: "0644"
-    - path: "usr/local/bin/move_old_logs.sh"
-      mode: "0755"
-  notify: daemon-reload
-
-- name: install service for moving old logs to archive
-  ansible.builtin.template:
-    src: "usr/local/lib/systemd/system/move_old_logs_@.service.j2"
-    dest: "/usr/local/lib/systemd/system/move_old_logs_@.service"
-    mode: "0644"
-    owner: "root"
-    group: "root"
-  notify: daemon-reload
-
-- name: enable move_old_logs services
-  ansible.builtin.systemd:
-    name: "move_old_logs_@{{ item }}.service"
-    daemon_reload: true
-    enabled: true
-  loop:
-#    - "disapp"
-    - "subapp"
-#    - "subapp_webservice"
-
-- name: start timer for moving old logs to archive (the service is triggered by the timer and doesn't need to be started separately)
-  ansible.builtin.systemd:
-    name: "move_old_logs.timer"
-    enabled: true
-    state: started
diff --git a/tasks/main.yml b/tasks/main.yml
index 04fb5c1..3fa259c 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -35,7 +35,3 @@
 - name: iptables-Regeln für externe Produzenten setzen
   ansible.builtin.import_tasks: "configure_iptables_externalusers.yml"
   tags: [iptables]
-
-- name: install scripts and services for moving old logs to archive
-  ansible.builtin.import_tasks: "install_move_logs.yml"
-  tags: [log, cleanup]
-- 
GitLab