ansible/roles/services/tasks/services.yml

26 lines
591 B
YAML
Raw Normal View History

# vim: ft=yaml.ansible
2024-03-01 20:30:18 +00:00
# code: language=ansible
---
2023-10-04 17:43:11 +00:00
- name: Set up external services network
2018-06-24 13:16:56 +00:00
docker_network:
name: external_services
2018-06-24 13:17:35 +00:00
2023-10-04 17:43:11 +00:00
- name: Deploy all services
include_tasks:
2023-10-04 17:43:11 +00:00
file: block.yml
vars:
2024-02-18 16:18:54 +00:00
service:
name: "{{ item }}"
vars: "{{ services[item] }}"
loop: "{{ services_include }}"
when: single_service is not defined
2023-10-04 17:43:11 +00:00
- name: Deploy single service
include_tasks:
file: block.yml
vars:
2024-02-18 16:18:54 +00:00
service:
name: "{{ single_service }}"
vars: "{{ services[single_service] }}"
when: single_service is defined and single_service in services