2023-05-05 22:19:15 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Set service_dir
|
|
|
|
ansible.builtin.set_fact:
|
|
|
|
service_dir: "{{ compose_dir | mandatory }}/{{ service | mandatory }}{% if service_name is defined %}-{{ service_name }}{% endif %}"
|
|
|
|
cacheable: true
|
|
|
|
|
|
|
|
- ansible.builtin.debug:
|
|
|
|
msg: "Working on {{ service }}{% if service_name is defined %}-{{ service_name }}{% endif %}"
|
|
|
|
verbosity: 0
|
|
|
|
|
2023-05-05 23:52:24 +02:00
|
|
|
- include_tasks: running.yml
|
|
|
|
when: state == "running"
|
|
|
|
|
|
|
|
- include_tasks: build.yml
|
|
|
|
when: state == "build"
|
|
|
|
|
|
|
|
- include_tasks: present.yml
|
2023-05-05 22:19:15 +02:00
|
|
|
when: state == "present"
|
|
|
|
|
|
|
|
- include_tasks: remove.yml
|
|
|
|
when: state == "absent"
|
|
|
|
|
|
|
|
...
|