data.coop-ansible/roles/docker/tasks/services.yml

22 lines
820 B
YAML
Raw Normal View History

# vim: ft=yaml.ansible
---
2018-06-24 13:16:56 +00:00
- name: setup external services network
docker_network:
name: external_services
2018-06-24 13:17:35 +00:00
- name: setup services
include_tasks: "services/{{ item.service.file }}"
loop: "{{ services | dict2items(value_name='service') }}"
when: single_service is not defined and
item.service.file is defined and
2023-03-05 22:10:53 +00:00
(item.service.disabled_in_vagrant is not defined or
not (item.service.disabled_in_vagrant and vagrant))
- name: setup single service
include_tasks: "services/{{ services[single_service].file }}"
when: single_service is defined and
single_service in services and
services[single_service].file is defined 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))