mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-31 15:48:57 +02:00
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.
This commit is contained in:
37
roles/sys-ctl-bkp-docker-2-loc/tasks/01_core.yml
Normal file
37
roles/sys-ctl-bkp-docker-2-loc/tasks/01_core.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
- name: Include dependencies
|
||||
include_role:
|
||||
name: '{{ item }}'
|
||||
loop:
|
||||
- sys-bkp-provider
|
||||
- sys-ctl-alm-compose
|
||||
- sys-lock
|
||||
- sys-svc-directory-validator
|
||||
|
||||
- include_tasks: 02_pkgmgr_routines.yml
|
||||
when: backup_docker_to_local_folder is not defined
|
||||
|
||||
- name: "reset (if enabled)"
|
||||
include_tasks: 03_reset.yml
|
||||
when: MODE_RESET | bool
|
||||
|
||||
- name: "setup '{{ BKP_DOCKER_2_LOC_SERVICE_ALL }}'"
|
||||
template:
|
||||
src: "{{ role_name }}-everything.service.j2"
|
||||
dest: /etc/systemd/system/{{ BKP_DOCKER_2_LOC_SERVICE_ALL }}
|
||||
notify: reload backup docker to local (all) service
|
||||
|
||||
- name: "setup '{{ BKP_DOCKER_2_LOC_SERVICE }}'"
|
||||
template:
|
||||
src: "{{ role_name }}.service.j2"
|
||||
dest: /etc/systemd/system/{{ BKP_DOCKER_2_LOC_SERVICE }}
|
||||
notify: reload backup docker to local service
|
||||
|
||||
- name: "set 'service_name' to '{{ role_name }}'"
|
||||
set_fact:
|
||||
service_name: "{{ role_name }}"
|
||||
|
||||
- name: "include role for sys-timer for {{ service_name }}"
|
||||
include_role:
|
||||
name: sys-timer
|
||||
vars:
|
||||
on_calendar: "{{SYS_SCHEDULE_BACKUP_DOCKER_TO_LOCAL}}"
|
Reference in New Issue
Block a user