mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
General optimations
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
11
roles/docker-compose/tasks/reset.yml
Normal file
11
roles/docker-compose/tasks/reset.yml
Normal 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
|
@@ -0,0 +1 @@
|
||||
docker_compose_variable_file: "{{ role_path }}/vars/docker-compose.yml"
|
Reference in New Issue
Block a user