Make matrix-dynamic-dns use its own container network

This commit is contained in:
Slavi Pantaleev
2024-01-13 17:17:03 +02:00
parent 75f8a879de
commit c96a0156c0
5 changed files with 18 additions and 1 deletions

View File

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

View File

@ -14,3 +14,11 @@
with_items: "{{ matrix_dynamic_dns_domain_configurations }}"
loop_control:
loop_var: configuration
- name: Fail if required mautrix-dynamic-dns 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_dynamic_dns_container_network', when: true}