2022-12-22 19:18:27 +00:00
|
|
|
# vim: ft=yaml.ansible
|
2022-12-21 21:25:10 +00:00
|
|
|
---
|
2023-04-26 21:43:54 +00:00
|
|
|
- name: Create Docker network for services
|
|
|
|
community.docker.docker_network:
|
|
|
|
name: services
|
2023-10-28 19:59:09 +00:00
|
|
|
enable_ipv6: true
|
2023-04-26 21:43:54 +00:00
|
|
|
ipam_config:
|
|
|
|
- subnet: 172.16.0.0/16
|
2023-10-28 19:59:09 +00:00
|
|
|
- subnet: fd02::/64
|
2023-04-26 21:43:54 +00:00
|
|
|
state: present
|
|
|
|
|
2023-06-27 10:44:10 +00:00
|
|
|
- name: Create base directories for Docker volumes
|
2023-04-26 21:43:54 +00:00
|
|
|
ansible.builtin.file:
|
2023-06-30 23:18:03 +00:00
|
|
|
name: "{{ item }}"
|
2023-04-26 21:43:54 +00:00
|
|
|
owner: root
|
|
|
|
mode: u=rwx,g=rx,o=rx
|
|
|
|
state: directory
|
2023-06-27 10:44:10 +00:00
|
|
|
loop:
|
|
|
|
- "{{ base_volume }}"
|
|
|
|
- "{{ mass_data_volume }}"
|
2023-04-26 21:43:54 +00:00
|
|
|
|
2022-12-21 21:25:10 +00:00
|
|
|
- name: Deploy services
|
2023-03-22 18:31:21 +00:00
|
|
|
ansible.builtin.include_tasks: services/{{ item.key }}.yml
|
2023-01-03 21:30:22 +00:00
|
|
|
loop: "{{ services | dict2items }}"
|
2022-12-25 23:29:46 +00:00
|
|
|
when: single_service is not defined
|
2022-12-21 21:25:10 +00:00
|
|
|
|
|
|
|
- name: Deploy single service
|
2023-03-22 18:31:21 +00:00
|
|
|
ansible.builtin.include_tasks: services/{{ single_service }}.yml
|
2022-12-21 21:25:10 +00:00
|
|
|
when: single_service is defined and
|
2022-12-25 23:29:46 +00:00
|
|
|
single_service in services
|