- 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 - 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