mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-12-12 08:43:55 +02:00
Fixed self-build functionality for mautrix-signal and added self-build functionality for signald
This commit is contained in:
parent
aa6398a948
commit
f933ba14ae
@ -374,14 +374,14 @@ matrix_mautrix_signal_login_shared_secret: "{{ matrix_synapse_ext_password_provi
|
||||
matrix_mautrix_signal_database_engine: 'postgres'
|
||||
matrix_mautrix_signal_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.signal.db') | to_uuid }}"
|
||||
|
||||
matrix_mautrix_signal_daemon_container_self_build: "{{ matrix_architecture != 'amd64' }}" # sadly not automatic detectable because no manifest
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# /matrix-bridge-mautrix-signal
|
||||
#
|
||||
######################################################################
|
||||
|
||||
matrix_mautrix_signal_container_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# matrix-bridge-mautrix-telegram
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
matrix_mautrix_signal_enabled: true
|
||||
|
||||
matrix_mautrix_signal_self_build: false
|
||||
matrix_mautrix_signal_container_self_build: false
|
||||
matrix_mautrix_signal_docker_repo: "https://mau.dev/tulir/mautrix-signal.git"
|
||||
matrix_mautrix_signal_docker_src_files_path: "{{ matrix_base_data_path }}/mautrix-signal/docker-src"
|
||||
|
||||
@ -13,6 +13,10 @@ matrix_mautrix_signal_daemon_version: latest
|
||||
matrix_mautrix_signal_docker_image: "dock.mau.dev/tulir/mautrix-signal:{{ matrix_mautrix_signal_version }}"
|
||||
matrix_mautrix_signal_docker_image_force_pull: "{{ matrix_mautrix_signal_docker_image.endswith(':latest') }}"
|
||||
|
||||
matrix_mautrix_signal_daemon_container_self_build: false
|
||||
matrix_mautrix_signal_daemon_docker_repo: "https://mau.dev/maunium/signald.git"
|
||||
matrix_mautrix_signal_daemon_docker_src_files_path: "{{ matrix_base_data_path }}/mautrix-signald/docker-src"
|
||||
|
||||
matrix_mautrix_signal_daemon_docker_image: "dock.mau.dev/maunium/signald:{{ matrix_mautrix_signal_daemon_version }}"
|
||||
matrix_mautrix_signal_daemon_docker_image_force_pull: "{{ matrix_mautrix_signal_daemon_docker_image.endswith(':latest') }}"
|
||||
|
||||
|
@ -8,13 +8,25 @@
|
||||
The matrix-bridge-mautrix-signal role needs to execute before the matrix-synapse role.
|
||||
when: "matrix_synapse_role_executed|default(False)"
|
||||
|
||||
- name: Ensure Mautrix Signal image is pulled
|
||||
docker_image:
|
||||
name: "{{ matrix_mautrix_signal_docker_image }}"
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
force_source: "{{ matrix_mautrix_signal_docker_image_force_pull 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_mautrix_signal_docker_image_force_pull }}"
|
||||
# pull:
|
||||
# platform: "{{ matrix_architecture }}"
|
||||
when: "matrix_mautrix_signal_enabled|bool and not matrix_mautrix_signal_container_self_build|bool"
|
||||
register: matrix_mautrix_signal_pull_results
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Ensure Mautrix Signal repository is present on self-build
|
||||
git:
|
||||
repo: "{{ matrix_mautrix_signal_docker_repo }}"
|
||||
dest: "{{ matrix_mautrix_signal_docker_src_files_path }}"
|
||||
force: "yes"
|
||||
register: matrix_mautrix_signal_git_pull_results
|
||||
when: "matrix_mautrix_signal_enabled|bool and matrix_mautrix_signal_container_self_build|bool"
|
||||
when: "matrix_mautrix_signal_enabled|bool and (matrix_mautrix_signal_container_self_build|bool or matrix_mautrix_signal_pull_results is failed)"
|
||||
|
||||
- name: Ensure Mautrix Signal image is built
|
||||
docker_image:
|
||||
@ -26,16 +38,8 @@
|
||||
dockerfile: Dockerfile
|
||||
path: "{{ matrix_mautrix_signal_docker_src_files_path }}"
|
||||
pull: yes
|
||||
when: "matrix_mautrix_signal_enabled|bool and matrix_mautrix_signal_container_self_build|bool"
|
||||
when: "matrix_mautrix_signal_enabled|bool and (matrix_mautrix_signal_container_self_build|bool or matrix_mautrix_signal_pull_results is failed)"
|
||||
|
||||
- name: Ensure Mautrix Signal image is pulled
|
||||
docker_image:
|
||||
name: "{{ matrix_mautrix_signal_docker_image }}"
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
force_source: "{{ matrix_mautrix_signal_docker_image_force_pull 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_mautrix_signal_docker_image_force_pull }}"
|
||||
when: "matrix_mautrix_signal_enabled|bool and not matrix_mautrix_signal_container_self_build|bool"
|
||||
|
||||
|
||||
- name: Ensure Mautrix Signal Daemon image is pulled
|
||||
docker_image:
|
||||
@ -43,7 +47,29 @@
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
force_source: "{{ matrix_mautrix_signal_daemon_docker_image_force_pull 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_mautrix_signal_daemon_docker_image_force_pull }}"
|
||||
when: matrix_mautrix_signal_enabled|bool
|
||||
when: matrix_mautrix_signal_enabled and not matrix_mautrix_signal_daemon_container_self_build|bool
|
||||
register: matrix_mautrix_signal_daemon_pull_results
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Ensure Mautrix Signal Daemon repository is present on self-build
|
||||
git:
|
||||
repo: "{{ matrix_mautrix_signal_daemon_docker_repo }}"
|
||||
dest: "{{ matrix_mautrix_signal_daemon_docker_src_files_path }}"
|
||||
force: "yes"
|
||||
register: matrix_mautrix_signal_daemon_git_pull_results
|
||||
when: "matrix_mautrix_signal_enabled|bool and (matrix_mautrix_signal_daemon_container_self_build|bool or matrix_mautrix_signal_daemon_pull_results is failed)"
|
||||
|
||||
- name: Ensure Mautrix Signal Daemon image is built
|
||||
docker_image:
|
||||
name: "{{ matrix_mautrix_signal_daemon_docker_image }}"
|
||||
source: build
|
||||
force_source: "{{ matrix_mautrix_signal_daemon_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_mailer_git_pull_results.changed }}"
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
path: "{{ matrix_mautrix_signal_daemon_docker_src_files_path }}"
|
||||
pull: yes
|
||||
when: "matrix_mautrix_signal_enabled|bool and (matrix_mautrix_signal_daemon_container_self_build|bool or matrix_mautrix_signal_daemon_pull_results is failed)"
|
||||
|
||||
- name: Ensure Mautrix Signal paths exist
|
||||
file:
|
||||
|
Loading…
Reference in New Issue
Block a user