30 lines
792 B
YAML
30 lines
792 B
YAML
# vim: ft=yaml.ansible
|
|
---
|
|
- name: Start but disable Docker daemon
|
|
service:
|
|
name: "{{ item }}"
|
|
enabled: false
|
|
state: started
|
|
loop:
|
|
- docker.socket
|
|
- docker.service
|
|
|
|
- name: Create base directory for Docker volumes
|
|
file:
|
|
name: "{{ base_volume }}"
|
|
owner: "{{ ansible_user }}"
|
|
mode: u=rwx,g=rx,o=rx
|
|
state: directory
|
|
|
|
- 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
|