mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-08 10:26:35 +00:00
Optimized for 2.20
This commit is contained in:
@@ -1,17 +1,27 @@
|
||||
- name: "Find optional Dockerfile for {{ application_id }}"
|
||||
set_fact:
|
||||
dockerfile_src: >-
|
||||
{{ lookup(
|
||||
'first_found',
|
||||
{
|
||||
'files': [
|
||||
application_id | abs_role_path_by_application_id ~ '/templates/Dockerfile.j2',
|
||||
application_id | abs_role_path_by_application_id ~ '/files/Dockerfile'
|
||||
]
|
||||
},
|
||||
errors='ignore'
|
||||
) | default('', true)
|
||||
}}
|
||||
|
||||
- name: "Create (optional) Dockerfile for {{ application_id }}"
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
src: "{{ dockerfile_src }}"
|
||||
dest: "{{ docker_compose.files.dockerfile }}"
|
||||
loop:
|
||||
- "{{ application_id | abs_role_path_by_application_id }}/templates/Dockerfile.j2"
|
||||
- "{{ application_id | abs_role_path_by_application_id }}/files/Dockerfile"
|
||||
notify:
|
||||
notify:
|
||||
- docker compose build
|
||||
- docker compose up
|
||||
register: create_dockerfile_result
|
||||
failed_when:
|
||||
- create_dockerfile_result is failed
|
||||
- "'Could not find or access' not in create_dockerfile_result.msg"
|
||||
when:
|
||||
- dockerfile_src | default('') | length > 0
|
||||
|
||||
- name: "Create (optional) '{{ docker_compose.files.env }}'"
|
||||
template:
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
system_service_timer_enabled: true
|
||||
when:
|
||||
- not MODE_RESET | bool
|
||||
- users['no-reply'].mailu_token | default(false)
|
||||
- users['no-reply'].mailu_token is defined
|
||||
|
||||
- include_tasks: utils/once_finalize.yml
|
||||
@@ -19,7 +19,7 @@
|
||||
include_tasks: 04_files.yml
|
||||
when:
|
||||
- system_service_copy_files | bool
|
||||
- system_service_script_src
|
||||
- system_service_script_src | default('') | length > 0
|
||||
|
||||
- name: "Load systemctl logic for '{{ system_service_id }}'"
|
||||
include_tasks: 05_service.yml
|
||||
|
||||
Reference in New Issue
Block a user