---

- block:

  - name: create project related directories
    file:
      path: "{{ item }}"
      state: directory
    with_items:
      - /etc/docker-compose/ki_server_health
    notify:
      - restart ki_server_health

  - name: Copy compose file of ki_server_health
    template:
      src: "{{ item.src }}"
      dest: "{{ item.dest }}"
    with_items:
      - src: "docker-compose.yml"
        dest: "/etc/docker-compose/ki_server_health/docker-compose.yml"
    notify:
      - restart ki_server_health

  - name: start ki_server_health
    docker_service:
      project_src: /etc/docker-compose/ki_server_health
      state: present
    notify:
      - restart ki_server_health

  become: yes
