Kevin Veen-Birkenbach 3a839cfe37
Refactor systemctl services and categories due to alarm bugs
This commit restructures systemctl service definitions and category mappings.

Motivation: Alarm-related bugs revealed inconsistencies in service and role handling.

Preparation step: lays the groundwork for fixing the alarm issues by aligning categories, roles, and service templates.
2025-08-18 13:35:43 +02:00

41 lines
1.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

- block:
- name: Include dependencies
include_role:
name: '{{ item }}'
loop:
- sys-ctl-cln-bkps
- sys-lock
- include_tasks: utils/run_once.yml
when: run_once_svc_bkp_loc_2_usb is not defined
- name: Fail if any backup_to_usb variable is empty
assert:
that:
- backup_to_usb_mount != ""
- backup_to_usb_target != ""
- backup_to_usb_source != ""
fail_msg: |
One or more of the configuration variables are empty!
Please set:
- mount
- target
- source
to nonempty values in your configuration file.
- name: Copy backup script to the scripts directory
copy:
src: svc-bkp-loc-2-usb.py
dest: "{{ backup_to_usb_script_path }}"
owner: root
group: root
mode: '0755'
- name: Copy systemd service to systemd directory
template:
src: svc-bkp-loc-2-usb.service.j2
dest: /etc/systemd/system/svc-bkp-loc-2-usb{{ SYS_SERVICE_SUFFIX }}
owner: root
group: root
mode: '0644'
notify: reload svc-bkp-loc-2-usb service