mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Big code and variable refactoring
This commit is contained in:
1
roles/docker-compose/defaults/main.yml
Normal file
1
roles/docker-compose/defaults/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
docker_compose_instance_directory: "{{ path_docker_compose_instances + docker_compose_project_name + '/' }}"
|
24
roles/docker-compose/tasks/main.yml
Normal file
24
roles/docker-compose/tasks/main.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
- name: load docker compose dependencies
|
||||
include_role:
|
||||
name: docker-compose
|
||||
|
||||
- name: "remove {{ docker_compose_instance_directory }} and all its contents"
|
||||
file:
|
||||
path: "{{ docker_compose_instance_directory }}"
|
||||
state: absent
|
||||
when: mode_reset | bool
|
||||
|
||||
- name: "create {{docker_compose_instance_directory}}"
|
||||
file:
|
||||
path: "{{docker_compose_instance_directory}}"
|
||||
state: directory
|
||||
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
|
Reference in New Issue
Block a user