40 lines
969 B
YAML
40 lines
969 B
YAML
# vim: ft=yaml.ansible
|
|
# code: language=ansible
|
|
---
|
|
- name: Create Docker network for apps
|
|
community.docker.docker_network:
|
|
name: "{{ apps_shared_docker_network }}"
|
|
enable_ipv6: true
|
|
ipam_config:
|
|
- subnet: 172.17.2.0/24
|
|
gateway: 172.17.2.1
|
|
state: present
|
|
|
|
- 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
|
|
ansible.builtin.file:
|
|
path: "{{ apps_data_root }}"
|
|
owner: root
|
|
mode: u=rwx,g=rx,o=rx
|
|
state: directory
|
|
|
|
- name: Configure apps
|
|
ansible.builtin.include_tasks:
|
|
file: configure_app.yml
|
|
vars:
|
|
app_name: "{{ item }}"
|
|
app_vars: "{{ apps_vars[item] }}"
|
|
loop: "{{ apps_include }}"
|
|
|
|
- name: Copy deploy.sh
|
|
ansible.builtin.template:
|
|
src: scripts/deploy.sh.j2
|
|
dest: /usr/local/bin/deploy.sh
|
|
owner: root
|
|
mode: u=rwx,g=rx,o=rx
|