ansible/roles/docker/tasks/services.yml

29 lines
832 B
YAML
Raw Normal View History

# vim: ft=yaml.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 and
(item.vars.disabled_in_vagrant is not defined or
not (item.vars.disabled_in_vagrant and vagrant))
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] }}"
2023-10-03 20:13:30 +00:00
when: single_service is defined and single_service in services and
2023-03-05 22:10:53 +00:00
(services[single_service].disabled_in_vagrant is not defined or
not (services[single_service].disabled_in_vagrant and vagrant))