2025-01-30 15:04:23 +01:00
|
|
|
- name: "Set global docker_compose_instance_directory: {{ path_docker_compose_instances }}{{ application_id }}/"
|
2025-01-29 14:42:13 +01:00
|
|
|
set_fact:
|
2025-01-30 15:04:23 +01:00
|
|
|
docker_compose_instance_directory: "{{ path_docker_compose_instances }}{{ application_id }}/"
|
|
|
|
|
2025-01-31 13:14:07 +01:00
|
|
|
- name: "Set global domain based on application_id"
|
2025-01-30 15:04:23 +01:00
|
|
|
set_fact:
|
2025-01-31 13:14:07 +01:00
|
|
|
domain: "{{ domains[application_id] if application_id in domains else None }}"
|
|
|
|
# Default case: One Domain exists. Some applications like matrix don't have an default key
|
2025-01-30 15:04:23 +01:00
|
|
|
|
|
|
|
- name: "Set global http_port to {{ ports.localhost.http_ports[application_id] }}"
|
|
|
|
set_fact:
|
|
|
|
http_port: "{{ ports.localhost.http_ports[application_id] }}"
|
2025-01-29 14:42:13 +01:00
|
|
|
|
2024-01-08 15:14:55 +01:00
|
|
|
- name: "remove {{ docker_compose_instance_directory }} and all its contents"
|
|
|
|
file:
|
|
|
|
path: "{{ docker_compose_instance_directory }}"
|
|
|
|
state: absent
|
2024-01-08 19:38:36 +01:00
|
|
|
when: mode_reset | bool
|
2024-01-08 15:14:55 +01:00
|
|
|
|
|
|
|
- name: "create {{docker_compose_instance_directory}}"
|
|
|
|
file:
|
|
|
|
path: "{{docker_compose_instance_directory}}"
|
|
|
|
state: directory
|
2025-01-29 14:20:34 +01:00
|
|
|
mode: 0755
|
|
|
|
|
|
|
|
- name: flush docker service
|
|
|
|
meta: flush_handlers
|
|
|
|
when: run_once_docker_compose is not defined
|
|
|
|
|
|
|
|
- name: run the docker tasks once
|
|
|
|
set_fact:
|
|
|
|
run_once_docker_compose: true
|
|
|
|
when: run_once_docker_compose is not defined
|