This repository has been archived on 2023-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
pi-ansible/roles/docker/tasks/services.yml

21 lines
630 B
YAML
Raw Normal View History

2022-12-22 19:18:27 +00:00
# vim: ft=yaml.ansible
2022-12-21 21:25:10 +00:00
---
2022-12-22 19:18:27 +00:00
- name: Create base directory for Docker volumes
file:
name: "{{ base_volume }}"
owner: "{{ ansible_user }}"
mode: u=rwx,g=rx,o=rx
state: directory
2022-12-21 21:25:10 +00:00
- name: Deploy 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
- name: Deploy 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