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.
20 lines
676 B
YAML
20 lines
676 B
YAML
- name: "setup systemctl {{ item }} '{{ systemctl_id }}'"
|
|
template:
|
|
src: "{{ lookup(
|
|
'first_found',
|
|
{
|
|
'files': ['templates/systemctl' ~ item ~ '.service.j2'],
|
|
'paths': [systemctl_role_dir, role_path]
|
|
},
|
|
errors='strict'
|
|
) }}"
|
|
dest: "{{ [ PATH_SYSTEM_SERVICE_DIR, systemctl_id ~ item ~ SYS_SERVICE_SUFFIX ] | path_join }}"
|
|
notify: "{{ 'reload system daemon' if item == '@' else 'refresh systemctl service' }}"
|
|
register: services_template
|
|
failed_when:
|
|
- services_template is failed
|
|
- "'Could not find or access' not in services_template.msg"
|
|
loop:
|
|
- ""
|
|
- "@"
|