mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-27 05:55:15 +02:00
- Unified service templates into generic systemctl templates - Introduced reusable filter plugins for script path handling - Updated path variables and service/timer definitions - Migrated roles (backup, cleanup, repair, etc.) to use systemctl role - Added sys-daemon role for core systemd cleanup - Simplified timer handling via sys-timer role Note: This is a large refactor and some errors may still exist. Further testing and adjustments will be needed.
28 lines
735 B
YAML
28 lines
735 B
YAML
- name: "find best matching source for service script"
|
|
set_fact:
|
|
service_src: >-
|
|
{{
|
|
lookup('first_found', {
|
|
'files': [
|
|
'templates/script.sh.j2',
|
|
'templates/script.py.j2',
|
|
'files/script.sh',
|
|
'files/script.py'
|
|
]
|
|
}, errors='strict')
|
|
}}
|
|
when:
|
|
- systemctl_copy_files | bool
|
|
|
|
- name: "Load file logic for '{{ systemctl_id }}'"
|
|
include_tasks: 04_files.yml
|
|
when:
|
|
- systemctl_copy_files | bool
|
|
- service_src
|
|
|
|
- name: "Load systemctl logic for '{{ systemctl_id }}'"
|
|
include_tasks: 05_service.yml
|
|
|
|
- name: "Load timer logic for '{{ systemctl_id }}'"
|
|
include_tasks: 06_timer.yml
|
|
when: systemctl_timer_enabled | bool |