---
- name: "include docker-central-database"
  include_role: 
    name: docker-central-database

- name: "include role nginx-domain-setup for {{application_id}}"
  include_role:
    name: nginx-domain-setup
  vars:
    domain: 	"{{ domains[application_id] }}"
    http_port: 	"{{ ports.localhost.http[application_id] }}"

- name: "copy docker-compose.yml and env file"
  include_tasks: copy-docker-compose-and-env.yml

- name: "create directory {{import_directory_host}}"
  file:
    path: "{{import_directory_host}}"
    state: directory
    mode: 0755

- name: "Copy import files to {{ import_directory_host }}"
  template:
    src: "{{ item }}"
    dest: "{{ import_directory_host }}/{{ item | basename | regex_replace('\\.j2$', '') }}"
    mode: '770'
  loop: "{{ lookup('fileglob', '{{ role_path }}/templates/import/*.j2', wantlist=True) }}"
  notify: docker compose project setup