2023-10-28 23:00:05 +00:00
|
|
|
# vim: ft=yaml.ansible
|
2023-10-29 19:46:52 +00:00
|
|
|
# code: language=ansible
|
2023-10-28 23:00:05 +00:00
|
|
|
---
|
2023-10-29 19:46:52 +00:00
|
|
|
- name: Create Docker network for apps
|
|
|
|
community.docker.docker_network:
|
2023-11-03 22:38:15 +00:00
|
|
|
name: "{{ apps_shared_docker_network }}"
|
2023-10-29 19:46:52 +00:00
|
|
|
enable_ipv6: true
|
|
|
|
ipam_config:
|
|
|
|
- subnet: 172.17.2.0/24
|
2023-12-25 20:49:17 +00:00
|
|
|
- subnet: fd02::/64
|
2024-08-05 18:09:46 +00:00
|
|
|
state: "{{ 'present' if apps_create_shared_docker_network is undefined or apps_create_shared_docker_network else 'absent' }}"
|
2023-10-28 23:00:05 +00:00
|
|
|
|
2023-11-03 22:38:15 +00:00
|
|
|
- name: Create Docker network for Postfix
|
|
|
|
community.docker.docker_network:
|
|
|
|
name: "{{ apps_postfix_docker_network }}"
|
|
|
|
state: present
|
|
|
|
when: "'postfix' in apps_include"
|
|
|
|
|
2024-02-10 19:03:04 +00:00
|
|
|
- name: Create Docker network for Tor
|
|
|
|
community.docker.docker_network:
|
|
|
|
name: "{{ apps_tor_docker_network }}"
|
|
|
|
state: present
|
|
|
|
when: "'tor' in apps_include"
|
|
|
|
|
2023-12-27 23:07:21 +00:00
|
|
|
- name: Create base directory for apps
|
2023-10-28 23:00:05 +00:00
|
|
|
ansible.builtin.file:
|
2023-11-13 20:31:09 +00:00
|
|
|
path: "{{ apps_data_root }}"
|
2023-10-29 19:46:52 +00:00
|
|
|
owner: root
|
2024-01-30 18:15:51 +00:00
|
|
|
group: root
|
2023-11-11 14:47:51 +00:00
|
|
|
mode: u=rwx,g=rx,o=rx
|
2023-10-29 19:46:52 +00:00
|
|
|
state: directory
|
2023-10-28 23:00:05 +00:00
|
|
|
|
2023-10-29 19:46:52 +00:00
|
|
|
- name: Configure apps
|
2024-01-09 20:36:49 +00:00
|
|
|
ansible.builtin.include_tasks:
|
|
|
|
file: app.yml
|
2023-10-31 21:06:25 +00:00
|
|
|
loop: "{{ apps_include }}"
|
2024-01-09 20:36:49 +00:00
|
|
|
loop_control:
|
|
|
|
loop_var: app
|
2023-11-11 15:21:29 +00:00
|
|
|
|
|
|
|
- name: Copy deploy.sh
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: scripts/deploy.sh.j2
|
2023-12-28 17:59:05 +00:00
|
|
|
dest: /usr/bin/deploy.sh
|
2023-11-11 15:21:29 +00:00
|
|
|
owner: root
|
2024-01-30 18:15:51 +00:00
|
|
|
group: root
|
2023-11-11 15:21:29 +00:00
|
|
|
mode: u=rwx,g=rx,o=rx
|