4
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2026-05-20 12:58:02 +00:00

matrix-bridge-mautrix-wsproxy: switch to modern community.docker docker_image modules

Replaces `community.docker.docker_image` with the modern
`docker_image_pull` module. Drops the `ansible_version` compatibility
ladder and the now-redundant `_container_image_force_pull` variable
(the new pull module handles registry refresh natively via `pull: always`).

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/5191.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Slavi Pantaleev
2026-05-04 21:57:50 +03:00
parent d7ffb7a4c0
commit f4768aeed1
3 changed files with 12 additions and 10 deletions

View File

@@ -46,20 +46,22 @@
register: matrix_mautrix_wsproxy_support_files_result
- name: Ensure Mautrix wsproxy image is pulled
community.docker.docker_image:
community.docker.docker_image_pull:
name: "{{ matrix_mautrix_wsproxy_container_image }}"
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
force_source: "{{ matrix_mautrix_wsproxy_container_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_wsproxy_container_image_force_pull }}"
pull: always
register: matrix_mautrix_wsproxy_container_image_pull_result
retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ devture_playbook_help_container_retries_delay }}"
until: matrix_mautrix_wsproxy_container_image_pull_result is not failed
- name: Ensure Mautrix syncproxy image is pulled
community.docker.docker_image:
community.docker.docker_image_pull:
name: "{{ matrix_mautrix_wsproxy_syncproxy_container_image }}"
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
force_source: "{{ matrix_mautrix_wsproxy_syncproxy_container_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_wsproxy_syncproxy_container_image_force_pull }}"
pull: always
register: matrix_mautrix_wsproxy_syncproxy_container_image_pull_result
retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ devture_playbook_help_container_retries_delay }}"
until: matrix_mautrix_wsproxy_syncproxy_container_image_pull_result is not failed
- name: Ensure Mautrix wsproxy paths exists
ansible.builtin.file: