mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +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:
32
roles/sys-ctl-cln-bkps/tasks/01_core.yml
Normal file
32
roles/sys-ctl-cln-bkps/tasks/01_core.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
- name: Include dependencies
|
||||
include_role:
|
||||
name: '{{ item }}'
|
||||
loop:
|
||||
- dev-python-pip
|
||||
- sys-ctl-alm-compose
|
||||
- sys-lock
|
||||
- sys-rst-daemon
|
||||
|
||||
- name: install lsof and python-psutil
|
||||
community.general.pacman:
|
||||
name:
|
||||
- lsof
|
||||
- python-psutil
|
||||
state: present
|
||||
|
||||
- name: "create {{cleanup_backups_directory}}"
|
||||
file:
|
||||
path: "{{cleanup_backups_directory}}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: create sys-ctl-cln-backups.py
|
||||
copy:
|
||||
src: "sys-ctl-cln-backups.py"
|
||||
dest: "{{cleanup_backups_directory}}sys-ctl-cln-backups.py"
|
||||
|
||||
- name: create sys-ctl-cln-backups{{ SYS_SERVICE_SUFFIX }}
|
||||
template:
|
||||
src: "sys-ctl-cln-backups.service.j2"
|
||||
dest: "/etc/systemd/system/sys-ctl-cln-backups{{ SYS_SERVICE_SUFFIX }}"
|
||||
notify: reload sys-ctl-cln-backups service
|
5
roles/sys-ctl-cln-bkps/tasks/main.yml
Normal file
5
roles/sys-ctl-cln-bkps/tasks/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
- block:
|
||||
- include_tasks: 01_core.yml
|
||||
- include_tasks: utils/run_once.yml
|
||||
when: run_once_sys_ctl_cln_bkps is not defined
|
||||
|
Reference in New Issue
Block a user