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
|
|
|
|
- subnet: fd02::/64
|
2023-10-28 23:00:05 +00:00
|
|
|
state: present
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
- name: Create base folder for apps
|
2023-10-28 23:00:05 +00:00
|
|
|
ansible.builtin.file:
|
2023-10-29 19:46:52 +00:00
|
|
|
name: "{{ apps_data_root }}"
|
|
|
|
owner: root
|
2023-11-03 22:38:15 +00:00
|
|
|
mode: u=rwx,go=
|
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
|
2023-10-31 21:06:25 +00:00
|
|
|
ansible.builtin.include_tasks:
|
2023-11-03 22:38:15 +00:00
|
|
|
file: configure_app.yml
|
2023-10-31 21:06:25 +00:00
|
|
|
vars:
|
|
|
|
app_name: "{{ item }}"
|
|
|
|
app_vars: "{{ apps_vars[item] }}"
|
|
|
|
loop: "{{ apps_include }}"
|