2022-10-29 05:04:47 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Set service_dir
|
|
|
|
ansible.builtin.set_fact:
|
2023-03-30 21:51:23 +02:00
|
|
|
service_dir: "{{ compose_dir | mandatory }}/{{ service | mandatory }}{% if service_name is defined %}-{{ service_name }}{% endif %}"
|
2022-10-29 05:04:47 +02:00
|
|
|
cacheable: true
|
|
|
|
|
|
|
|
- ansible.builtin.debug:
|
2023-03-30 21:51:23 +02:00
|
|
|
msg: "Working on {{ service }}{% if service_name is defined %}-{{ service_name }}{% endif %}"
|
2022-10-29 05:04:47 +02:00
|
|
|
verbosity: 0
|
|
|
|
|
2022-10-30 02:31:21 +01:00
|
|
|
- include_tasks: create.yml
|
|
|
|
when: state == "present"
|
2022-10-29 05:04:47 +02:00
|
|
|
|
2022-10-30 02:31:21 +01:00
|
|
|
- include_tasks: remove.yml
|
|
|
|
when: state == "absent"
|
2022-10-29 05:04:47 +02:00
|
|
|
|
|
|
|
...
|