mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-09 10:56:01 +00:00
29 lines
865 B
YAML
29 lines
865 B
YAML
- name: "find best matching source for service script"
|
|
set_fact:
|
|
system_service_script_src: >-
|
|
{{ lookup('first_found',
|
|
{
|
|
'files': [
|
|
'templates/script.sh.j2',
|
|
'templates/script.py.j2',
|
|
'files/script.sh',
|
|
'files/script.py'
|
|
],
|
|
'paths': [ system_service_role_dir ]
|
|
},
|
|
errors='strict'
|
|
) }}
|
|
when: system_service_copy_files | bool
|
|
|
|
- name: "Load file logic for '{{ system_service_id }}'"
|
|
include_tasks: 04_files.yml
|
|
when:
|
|
- system_service_copy_files | bool
|
|
- system_service_script_src | default('') | length > 0
|
|
|
|
- name: "Load systemctl logic for '{{ system_service_id }}'"
|
|
include_tasks: 05_service.yml
|
|
|
|
- name: "Load timer logic for '{{ system_service_id }}'"
|
|
include_tasks: 06_timer.yml
|
|
when: system_service_timer_enabled | bool |