2023-05-05 23:52:24 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- include_tasks: present.yml
|
|
|
|
|
|
|
|
- name: Build 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 }}"
|
|
|
|
state: present
|
2023-06-07 20:23:26 +02:00
|
|
|
restarted: false
|
2024-01-22 15:31:49 +01:00
|
|
|
recreate: "auto"
|
2024-01-22 15:28:50 +01:00
|
|
|
build: "always"
|
2023-05-05 23:52:24 +02:00
|
|
|
remove_orphans: true
|
2023-06-05 22:20:18 +02:00
|
|
|
profiles: docker_profiles
|
2023-05-05 23:52:24 +02:00
|
|
|
when: (compose_files.changed and execute == "smart") or execute == "always"
|
2023-06-07 20:23:26 +02:00
|
|
|
- name: Push compose container images
|
|
|
|
ansible.builtin.shell:
|
|
|
|
chdir: "{{ service_dir | mandatory }}"
|
|
|
|
cmd: "docker-compose push"
|
|
|
|
when: docker_push | bool
|
2023-06-05 22:20:18 +02:00
|
|
|
|
|
|
|
# vim: ft=yaml.ansible
|