Merge branch 'spantaleev:master' into master

This commit is contained in:
Shreyas Ajjarapu 2022-03-11 10:51:21 -06:00 committed by GitHub
commit 8eca03b796
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 16 deletions

View File

@ -7,6 +7,8 @@ The playbook can install and configure
See the project page to learn what it does and why it might be useful to you. See the project page to learn what it does and why it might be useful to you.
**Note**: we actually use the [Beeper](https://www.beeper.com/)-maintained [fork of mx-puppet-discord](https://gitlab.com/beeper/mx-puppet-monorepo), because `matrix-discord/mx-puppet-discord` is a low-quality and poorly maintained project.
To enable the [Discord](https://discordapp.com/) bridge just use the following To enable the [Discord](https://discordapp.com/) bridge just use the following
playbook configuration: playbook configuration:

View File

@ -9,8 +9,6 @@
# You can also override ANY variable (seen here or in any given role), # You can also override ANY variable (seen here or in any given role),
# by re-defining it in your own configuration file (`inventory/host_vars/matrix.<your-domain>`). # by re-defining it in your own configuration file (`inventory/host_vars/matrix.<your-domain>`).
matrix_container_global_registry_prefix: "docker.io/"
###################################################################### ######################################################################
# #
# matrix-base # matrix-base

View File

@ -68,6 +68,8 @@ matrix_architecture: amd64
# We just remap from our `matrix_architecture` values to what Debian and possibly other distros call things. # We just remap from our `matrix_architecture` values to what Debian and possibly other distros call things.
matrix_debian_arch: "{{ 'armhf' if matrix_architecture == 'arm32' else matrix_architecture }}" matrix_debian_arch: "{{ 'armhf' if matrix_architecture == 'arm32' else matrix_architecture }}"
matrix_container_global_registry_prefix: "docker.io/"
matrix_user_username: "matrix" matrix_user_username: "matrix"
matrix_user_groupname: "matrix" matrix_user_groupname: "matrix"

View File

@ -1,11 +1,19 @@
--- ---
# Mx Puppet Discord is a Matrix <-> Discord bridge # Mx Puppet Discord is a Matrix <-> Discord bridge
# See: https://github.com/matrix-discord/mx-puppet-discord # See: https://gitlab.com/beeper/mx-puppet-monorepo (originally based on https://github.com/matrix-discord/mx-puppet-discord)
#
# We use the Beeper-maintained fork, because https://github.com/matrix-discord/mx-puppet-discord is horribly broken often. See:
# - https://github.com/matrix-discord/mx-puppet-discord/issues/201
# - https://github.com/matrix-discord/mx-puppet-discord/issues/202
# - https://github.com/matrix-discord/mx-puppet-discord/issues/203
# - (other similar issues in the past)
matrix_mx_puppet_discord_enabled: true matrix_mx_puppet_discord_enabled: true
matrix_mx_puppet_discord_container_image_self_build: false matrix_mx_puppet_discord_container_image_self_build: false
matrix_mx_puppet_discord_container_image_self_build_repo: "https://github.com/matrix-discord/mx-puppet-discord.git" matrix_mx_puppet_discord_container_image_self_build_repo: "https://gitlab.com/beeper/mx-puppet-monorepo"
matrix_mx_puppet_discord_container_image_self_build_version: "{{ 'main' if matrix_mx_puppet_discord_version == 'latest' else matrix_mx_puppet_discord_version }}"
matrix_mx_puppet_discord_container_image_self_build_dockerfile_path: "docker/Dockerfile-discord"
# Controls whether the mx-puppet-discord container exposes its HTTP port (tcp/8432 in the container). # Controls whether the mx-puppet-discord container exposes its HTTP port (tcp/8432 in the container).
# #
@ -13,8 +21,8 @@ matrix_mx_puppet_discord_container_image_self_build_repo: "https://github.com/ma
matrix_mx_puppet_discord_container_http_host_bind_port: '' matrix_mx_puppet_discord_container_http_host_bind_port: ''
matrix_mx_puppet_discord_version: latest matrix_mx_puppet_discord_version: latest
matrix_mx_puppet_discord_docker_image: "{{ matrix_mx_puppet_discord_docker_image_name_prefix }}sorunome/mx-puppet-discord:{{ matrix_mx_puppet_discord_version }}" matrix_mx_puppet_discord_docker_image: "{{ matrix_mx_puppet_discord_docker_image_name_prefix }}beeper/mx-puppet-monorepo/discord:{{ matrix_mx_puppet_discord_version }}"
matrix_mx_puppet_discord_docker_image_name_prefix: "{{ 'localhost/' if matrix_mx_puppet_discord_container_image_self_build else matrix_container_global_registry_prefix }}" matrix_mx_puppet_discord_docker_image_name_prefix: "{{ 'localhost/' if matrix_mx_puppet_discord_container_image_self_build else 'registry.gitlab.com/' }}"
matrix_mx_puppet_discord_docker_image_force_pull: "{{ matrix_mx_puppet_discord_docker_image.endswith(':latest') }}" matrix_mx_puppet_discord_docker_image_force_pull: "{{ matrix_mx_puppet_discord_docker_image.endswith(':latest') }}"
matrix_mx_puppet_discord_base_path: "{{ matrix_base_data_path }}/mx-puppet-discord" matrix_mx_puppet_discord_base_path: "{{ matrix_base_data_path }}/mx-puppet-discord"

View File

@ -78,6 +78,7 @@
repo: "{{ matrix_mx_puppet_discord_container_image_self_build_repo }}" repo: "{{ matrix_mx_puppet_discord_container_image_self_build_repo }}"
dest: "{{ matrix_mx_puppet_discord_docker_src_files_path }}" dest: "{{ matrix_mx_puppet_discord_docker_src_files_path }}"
force: "yes" force: "yes"
version: "{{ matrix_mx_puppet_discord_container_image_self_build_version }}"
register: matrix_mx_puppet_discord_git_pull_results register: matrix_mx_puppet_discord_git_pull_results
when: "matrix_mx_puppet_discord_enabled|bool and matrix_mx_puppet_discord_container_image_self_build" when: "matrix_mx_puppet_discord_enabled|bool and matrix_mx_puppet_discord_container_image_self_build"
@ -88,7 +89,7 @@
force_source: "{{ matrix_mx_puppet_discord_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" force_source: "{{ matrix_mx_puppet_discord_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}"
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mx_puppet_discord_git_pull_results.changed }}" force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mx_puppet_discord_git_pull_results.changed }}"
build: build:
dockerfile: Dockerfile dockerfile: "{{ matrix_mx_puppet_discord_container_image_self_build_dockerfile_path }}"
path: "{{ matrix_mx_puppet_discord_docker_src_files_path }}" path: "{{ matrix_mx_puppet_discord_docker_src_files_path }}"
pull: true pull: true
when: "matrix_mx_puppet_discord_enabled|bool and matrix_mx_puppet_discord_container_image_self_build|bool" when: "matrix_mx_puppet_discord_enabled|bool and matrix_mx_puppet_discord_container_image_self_build|bool"