2023-05-05 23:52:24 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- include_tasks: present.yml
|
|
|
|
|
|
|
|
- name: Build Service
|
|
|
|
community.docker.docker_compose:
|
|
|
|
project_src: "{{ service_dir | mandatory }}"
|
|
|
|
state: present
|
2023-06-07 20:23:26 +02:00
|
|
|
restarted: false
|
2023-05-05 23:52:24 +02:00
|
|
|
recreate: smart
|
|
|
|
build: true
|
|
|
|
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
|