General optimations

This commit is contained in:
2025-07-09 10:17:32 +02:00
parent a69b2c9cb2
commit af3767fdfa
72 changed files with 377 additions and 618 deletions

View File

@@ -1,13 +1,4 @@
---
# It is necessary to shut the projects down, when reset is activated.
# Otherwise it can lead to this bug:
# https://github.com/ansible/ansible/issues/10244
#- name: shut down docker compose project
# command:
# cmd: docker-compose -p "{{ application_id }}" down
# listen: docker compose up
# when: mode_reset | bool
- name: rebuild docker repository
command:
cmd: docker compose build

View File

@@ -1,10 +1,8 @@
- name: "Load variables from {{ role_path }}/vars/docker-compose.yml for whole play"
include_vars: "{{ role_path }}/vars/docker-compose.yml"
- name: "Load variables from {{ docker_compose_variable_file }} for whole play"
include_vars: "{{ docker_compose_variable_file }}"
- name: "Remove {{ docker_compose.directories.instance }} and all its contents"
file:
path: "{{ docker_compose.directories.instance }}"
state: absent
- name: "reset (if enabled)"
include_tasks: reset.yml
when: mode_reset | bool
# This could lead to problems in docker-compose directories which are based on a git repository

View File

@@ -0,0 +1,11 @@
# It is necessary to shut the projects down, when reset is activated.
# Otherwise it can lead to this bug:
# https://github.com/ansible/ansible/issues/10244
- name: shut down docker compose project
command:
cmd: "docker-compose -p {{ application_id }} down"
- name: "Remove {{ docker_compose.directories.instance }} and all its contents"
file:
path: "{{ docker_compose.directories.instance }}"
state: absent

View File

@@ -0,0 +1 @@
docker_compose_variable_file: "{{ role_path }}/vars/docker-compose.yml"