@ -8,13 +8,25 @@
The matrix-bridge-mautrix-signal role needs to execute before the matrix-synapse role.
The matrix-bridge-mautrix-signal role needs to execute before the matrix-synapse role.
when : "matrix_synapse_role_executed|default(False)"
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
- name : Ensure Mautrix Signal repository is present on self-build
git:
git:
repo : "{{ matrix_mautrix_signal_docker_repo }}"
repo : "{{ matrix_mautrix_signal_docker_repo }}"
dest : "{{ matrix_mautrix_signal_docker_src_files_path }}"
dest : "{{ matrix_mautrix_signal_docker_src_files_path }}"
force : "yes"
force : "yes"
register : matrix_mautrix_signal_git_pull_results
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
- name : Ensure Mautrix Signal image is built
docker_image:
docker_image:
@ -26,15 +38,7 @@
dockerfile : Dockerfile
dockerfile : Dockerfile
path : "{{ matrix_mautrix_signal_docker_src_files_path }}"
path : "{{ matrix_mautrix_signal_docker_src_files_path }}"
pull : yes
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
- name : Ensure Mautrix Signal Daemon image is pulled
@ -43,7 +47,29 @@
source : "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
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_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 }}"
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
- name : Ensure Mautrix Signal paths exist
file:
file: