39 lines
1.5 KiB
YAML
Raw Normal View History

- name: "load variables from {{ role_path }}/vars/docker-compose.yml for whole play"
include_vars: "{{ role_path }}/vars/docker-compose.yml"
- name: "Set global domain based on application_id"
set_fact:
domain: "{{ domains[application_id] }}"
when:
- application_id in domains
- domains[application_id] is string
2025-02-03 23:07:42 +01:00
# Default case: One domain exists. Some applications like matrix don't have an default domain
2025-02-12 12:41:13 +01:00
- name: "Set global http_port to {{ ports.localhost.http[application_id] }}"
set_fact:
2025-02-12 12:41:13 +01:00
http_port: "{{ ports.localhost.http[application_id] if application_id in ports.localhost.http else None }}"
2025-02-03 23:07:42 +01:00
# Default case: One port exists. Some applications like matrix don't have an default port
2025-01-29 14:42:13 +01:00
- name: "remove {{ docker_compose.directories.instance }} and all its contents"
file:
path: "{{ docker_compose.directories.instance }}"
state: absent
2024-01-08 19:38:36 +01:00
when: mode_reset | bool
# This could lead to problems in docker-compose directories which are based on a git repository
# @todo Verify that this isn't the case. E.g. in accounting
- name: "Create all docker-compose directories (including parent directories)"
file:
path: "{{ item.value }}"
state: directory
mode: '0755'
with_dict: "{{ docker_compose.directories }}"
2025-01-29 14:20:34 +01:00
- 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