25 lines
656 B
YAML
25 lines
656 B
YAML
---
|
|
|
|
- include_tasks: present.yml
|
|
|
|
- name: Restart Service
|
|
community.docker.docker_compose_v2:
|
|
project_src: "{{ service_dir | mandatory }}"
|
|
pull: "policy"
|
|
state: restarted
|
|
recreate: "auto"
|
|
build: "never"
|
|
profiles: docker_profiles
|
|
remove_orphans: true
|
|
when: (compose_files.changed and execute == "smart") or execute == "always"
|
|
|
|
- name: Start Service
|
|
community.docker.docker_compose_v2:
|
|
project_src: "{{ service_dir | mandatory }}"
|
|
pull: "policy"
|
|
state: present
|
|
recreate: "never"
|
|
build: "never"
|
|
profiles: docker_profiles
|
|
when: (compose_files.changed and execute == "smart") or execute == "always"
|