infrastructure/coreos-config/roles/compose_project/tasks/main.yml

19 lines
471 B
YAML
Raw Normal View History

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
- include_tasks: create.yml
when: state == "present"
2022-10-29 05:04:47 +02:00
- include_tasks: remove.yml
when: state == "absent"
2022-10-29 05:04:47 +02:00
...