23 lines
840 B
YAML

- name: "Load variables from {{ role_path }}/vars/docker-compose.yml for whole play"
include_vars: "{{ role_path }}/vars/docker-compose.yml"
- name: "Remove {{ docker_compose.directories.instance }} and all its contents"
file:
path: "{{ docker_compose.directories.instance }}"
state: absent
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 }}"
- include_tasks: "repository.yml"
when: docker_repository | bool
- include_tasks: "files.yml"
when: not docker_compose_skipp_file_creation | bool