Move matrix-bridge-heisenbridge to its own container network

This commit is contained in:
Slavi Pantaleev
2024-01-07 14:53:22 +02:00
parent 493a9abafa
commit 39e45b0298
6 changed files with 74 additions and 32 deletions

View File

@ -6,6 +6,9 @@
- install-all
- install-heisenbridge
block:
- when: matrix_heisenbridge_enabled | bool
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
- when: matrix_heisenbridge_enabled | bool
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"

View File

@ -29,6 +29,11 @@
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
- name: Ensure heisenbridge container network is created
community.general.docker_network:
name: "{{ matrix_heisenbridge_container_network }}"
driver: bridge
- name: Ensure matrix-heisenbridge.service installed
ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-heisenbridge.service.j2"

View File

@ -0,0 +1,10 @@
---
- name: Fail if required heisenbridge settings not defined
ansible.builtin.fail:
msg: >-
You need to define a required configuration setting (`{{ item.name }}`).
when: "item.when | bool and vars[item.name] == ''"
with_items:
- {'name': 'matrix_heisenbridge_container_network', when: true}
- {'name': 'matrix_heisenbridge_homeserver_url', when: true}