ansible-role-docker-compose/tasks/running.yml

25 lines
602 B
YAML
Raw Normal View History

---
- include_tasks: present.yml
- name: Start Service
community.docker.docker_compose_v2:
project_src: "{{ service_dir | mandatory }}"
pull: "policy"
state: present
recreate: "auto"
build: "never"
profiles: docker_profiles
remove_orphans: true
- name: Restart Service
2024-01-22 14:35:23 +01:00
community.docker.docker_compose_v2:
project_src: "{{ service_dir | mandatory }}"
pull: "policy"
state: restarted
recreate: "auto"
2024-01-22 15:28:50 +01:00
build: "never"
profiles: docker_profiles
remove_orphans: true
when: (compose_files.changed and execute == "smart") or execute == "always"