From 0628229f4756fb3b675a37e9c618e94eb2b9224d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de> Date: Wed, 10 Apr 2024 17:04:15 +0200 Subject: [PATCH] chore: remove tasks that were needed to migrate SystemD units to their correct location below /usr/ (and crashed our SubApps in 04/2024) --- tasks/install_subapp.yml | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/tasks/install_subapp.yml b/tasks/install_subapp.yml index 4ff8b49..8182e5b 100644 --- a/tasks/install_subapp.yml +++ b/tasks/install_subapp.yml @@ -40,38 +40,6 @@ state: latest allow_unauthenticated: "true" - -##### BEGIN ##### - -# Previously, our systemd unit files were installed below "/etc/systemd/user/" -# and activated semi-manually by calling -# `systemctl enable /full/path/to/systemd-unit.service`. This was the only way -# to make short names like "subapp.service" usable, which is a major -# convenience win in everyday operations. On the other hand, it also makes the -# SubApp start on bootup, which isn't always the desired and safe behaviour. -# -# To improve upon this situation, we're now moving the systemd units to -# "/usr/local/lib/systemd/system/", which, according to systemd's manual, is -# the more suitable location and also enables the use of short service names -# even if a service is not enabled and thus doesn't automatically startup on -# (re)boot. - -- name: find systemd units that are installed in the wrong location - ansible.builtin.find: - paths: - - "/etc/systemd/user/" - patterns: - - "*.service" - register: old_unit_files - -- name: disable and stop services - ansible.builtin.systemd: - unit: "{{ item.path | basename }}" - enabled: false - status: stopped - loop: "{{ old_unit_files.files }}" - when: old_unit_files.matched > 0 - - name: create directory for Systemd unitfiles ansible.builtin.file: path: "/usr/local/lib/systemd/system/" @@ -137,8 +105,6 @@ when: item.stdout != "enabled" tags: [systemd] -##### END ##### - - name: git installieren ansible.builtin.apt: name: "git" -- GitLab