# 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: "pkgmgr install '{{ DOCKER_COMPOSE_DOWN_ALL_PACKAGE }}'"
  include_role:
    name: pkgmgr-install
  vars:
    package_name: "{{ DOCKER_COMPOSE_DOWN_ALL_PACKAGE }}"

- name: Shutdown all docker compose instances in '{{ PATH_DOCKER_COMPOSE_INSTANCES }}' with '{{ DOCKER_COMPOSE_DOWN_ALL_PACKAGE }}'
  command: "{{ DOCKER_COMPOSE_DOWN_ALL_PACKAGE }} {{ PATH_DOCKER_COMPOSE_INSTANCES }}"

- name: "Remove directory '{{ PATH_DOCKER_COMPOSE_INSTANCES }}' and all its contents"
  file:
    path: "{{ PATH_DOCKER_COMPOSE_INSTANCES }}"
    state: absent
