Skip to content
Snippets Groups Projects
Commit 0628229f authored by Jörg Sachse's avatar Jörg Sachse
Browse files

chore: remove tasks that were needed to migrate SystemD units to their correct...

chore: remove tasks that were needed to migrate SystemD units to their correct location below /usr/ (and crashed our SubApps in 04/2024)
parent b532f7eb
No related branches found
No related tags found
No related merge requests found
Pipeline #6270 passed
...@@ -40,38 +40,6 @@ ...@@ -40,38 +40,6 @@
state: latest state: latest
allow_unauthenticated: "true" 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 - name: create directory for Systemd unitfiles
ansible.builtin.file: ansible.builtin.file:
path: "/usr/local/lib/systemd/system/" path: "/usr/local/lib/systemd/system/"
...@@ -137,8 +105,6 @@ ...@@ -137,8 +105,6 @@
when: item.stdout != "enabled" when: item.stdout != "enabled"
tags: [systemd] tags: [systemd]
##### END #####
- name: git installieren - name: git installieren
ansible.builtin.apt: ansible.builtin.apt:
name: "git" name: "git"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment