2025-01-11 15:39:30 +01:00
|
|
|
---
|
2025-01-29 14:20:34 +01:00
|
|
|
- name: "include docker-compose role"
|
|
|
|
include_role:
|
|
|
|
name: docker-compose
|
2025-01-11 15:39:30 +01:00
|
|
|
|
2025-02-19 02:00:41 +01:00
|
|
|
- name: "include role nginx-domain-setup for {{application_id}}"
|
2025-02-21 05:46:42 +01:00
|
|
|
include_role:
|
2025-02-19 02:00:41 +01:00
|
|
|
name: nginx-domain-setup
|
2025-02-21 05:46:42 +01:00
|
|
|
vars:
|
|
|
|
domain: "{{ domains[application_id] }}"
|
|
|
|
http_port: "{{ ports.localhost.http[application_id] }}"
|
2025-01-11 15:39:30 +01:00
|
|
|
|
2025-02-19 16:26:32 +01:00
|
|
|
- name: "include role docker-repository-setup for {{application_id}}"
|
|
|
|
include_role:
|
|
|
|
name: docker-repository-setup
|
|
|
|
|
2025-02-20 20:35:43 +01:00
|
|
|
- name: "Check if host-specific config.yaml exists in {{ config_inventory_path }}"
|
2025-02-19 16:26:32 +01:00
|
|
|
stat:
|
|
|
|
path: "{{ config_inventory_path }}"
|
2025-02-20 20:35:43 +01:00
|
|
|
delegate_to: localhost
|
|
|
|
become: false
|
2025-02-19 16:26:32 +01:00
|
|
|
register: config_file
|
2025-01-11 15:39:30 +01:00
|
|
|
|
2025-02-19 16:26:32 +01:00
|
|
|
- name: Copy host-specific config.yaml if it exists
|
2025-02-20 20:35:43 +01:00
|
|
|
template:
|
2025-02-19 16:26:32 +01:00
|
|
|
src: "{{ config_inventory_path }}"
|
|
|
|
dest: "{{docker_repository_path}}/app/config.yaml"
|
|
|
|
notify: docker compose project setup
|
|
|
|
when: config_file.stat.exists
|
|
|
|
|
|
|
|
- name: Copy default config.yaml from the role template if host-specific file does not exist
|
|
|
|
template:
|
|
|
|
src: "config.yaml.j2"
|
|
|
|
dest: "{{docker_repository_path}}/app/config.yaml"
|
2025-01-16 23:29:43 +01:00
|
|
|
notify: docker compose project setup
|
2025-02-19 16:26:32 +01:00
|
|
|
when: not config_file.stat.exists
|
2025-01-16 23:29:43 +01:00
|
|
|
|
2025-01-11 15:39:30 +01:00
|
|
|
- name: add docker-compose.yml
|
2025-02-04 18:14:37 +01:00
|
|
|
template: src=docker-compose.yml.j2 dest={{docker_compose.directories.instance}}docker-compose.yml
|
2025-01-11 15:39:30 +01:00
|
|
|
notify: docker compose project setup
|