---

### tags:

- name: "Setting service state of <{{ connect_id }}> to <present>"
  community.docker.docker_compose:
    project_src: '{{ service_base_path }}/{{ connect_id }}'
    state: present
  when: service_state == 'up'

- name: "Setting service state of <{{ connect_id }}> to <absent>"
  community.docker.docker_compose:
    project_src: '{{ service_base_path }}/{{ connect_id }}'
    state: absent
  when: service_state == 'down'

- name: "Setting service state of <{{ connect_id }}> to <restarted>"
  community.docker.docker_compose:
    project_src: '{{ service_base_path }}/{{ connect_id }}'
    restarted: yes
    pull: yes
  when: service_state == 'upgrade'
