From bf11a3c2ca97b20c8801fce4bc663630101f941b Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sun, 7 Jan 2024 11:56:05 +0200 Subject: [PATCH] Tie up some loose ends for matrix-appservice-discord --- group_vars/matrix_servers | 1 - .../matrix-bridge-appservice-discord/tasks/setup_install.yml | 5 +++++ .../tasks/validate_config.yml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index f3a79cd15..661fae217 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -511,7 +511,6 @@ matrix_appservice_discord_systemd_required_services_list_auto: | ([devture_postgres_identifier ~ '.service'] if (devture_postgres_enabled and matrix_appservice_discord_database_hostname == devture_postgres_connection_hostname) else []) }} - matrix_appservice_discord_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9005') if matrix_playbook_service_host_bind_interface_prefix else '' }}" matrix_appservice_discord_container_network: "{{ matrix_addons_container_network }}" diff --git a/roles/custom/matrix-bridge-appservice-discord/tasks/setup_install.yml b/roles/custom/matrix-bridge-appservice-discord/tasks/setup_install.yml index 632948bcd..56d875f2a 100644 --- a/roles/custom/matrix-bridge-appservice-discord/tasks/setup_install.yml +++ b/roles/custom/matrix-bridge-appservice-discord/tasks/setup_install.yml @@ -104,6 +104,11 @@ /bin/sh -c "node /build/tools/addbot.js > /cfg/invite_link" changed_when: false +- name: Ensure matrix-appservice-discord container network is created + community.general.docker_network: + name: "{{ matrix_appservice_discord_container_network }}" + driver: bridge + - name: Ensure matrix-appservice-discord.service installed ansible.builtin.template: src: "{{ role_path }}/templates/systemd/matrix-appservice-discord.service.j2" diff --git a/roles/custom/matrix-bridge-appservice-discord/tasks/validate_config.yml b/roles/custom/matrix-bridge-appservice-discord/tasks/validate_config.yml index fab6a5b6e..8b9d1d160 100644 --- a/roles/custom/matrix-bridge-appservice-discord/tasks/validate_config.yml +++ b/roles/custom/matrix-bridge-appservice-discord/tasks/validate_config.yml @@ -11,6 +11,7 @@ - {'name': 'matrix_appservice_discord_appservice_token', when: true} - {'name': 'matrix_appservice_discord_homeserver_token', when: true} - {'name': 'matrix_appservice_discord_homeserver_domain', when: true} + - {'name': 'matrix_appservice_discord_container_network', when: true} - {'name': 'matrix_appservice_discord_database_hostname', when: "{{ matrix_appservice_discord_database_engine == 'postgres' }}"} - name: (Deprecation) Catch and report renamed appservice-discord variables