You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hetzner-ansible/roles/service_state/tasks/main.yml

23 lines
672 B
YAML

---
### 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'