2023-05-05 23:52:24 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- include_tasks: present.yml
|
|
|
|
|
2024-01-22 15:40:29 +01:00
|
|
|
- name: Start Service
|
|
|
|
community.docker.docker_compose_v2:
|
|
|
|
project_src: "{{ service_dir | mandatory }}"
|
|
|
|
pull: "policy"
|
2024-01-22 15:41:12 +01:00
|
|
|
state: present
|
2024-01-22 15:40:29 +01:00
|
|
|
recreate: "auto"
|
|
|
|
build: "never"
|
|
|
|
profiles: docker_profiles
|
|
|
|
remove_orphans: true
|
|
|
|
|
2023-05-05 23:52:24 +02:00
|
|
|
- name: Restart Service
|
2024-01-22 14:35:23 +01:00
|
|
|
community.docker.docker_compose_v2:
|
2023-05-05 23:52:24 +02:00
|
|
|
project_src: "{{ service_dir | mandatory }}"
|
2024-01-22 15:36:29 +01:00
|
|
|
pull: "policy"
|
|
|
|
state: restarted
|
2024-01-22 15:31:49 +01:00
|
|
|
recreate: "auto"
|
2024-01-22 15:28:50 +01:00
|
|
|
build: "never"
|
2023-06-05 22:20:18 +02:00
|
|
|
profiles: docker_profiles
|
2023-05-05 23:52:24 +02:00
|
|
|
remove_orphans: true
|
|
|
|
when: (compose_files.changed and execute == "smart") or execute == "always"
|