From d7ffb7a4c0b20b1c8bcc023a7db77d41ac2c4b12 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 4 May 2026 21:57:16 +0300 Subject: [PATCH] matrix-bridge-sms: 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) --- roles/custom/matrix-bridge-sms/tasks/setup_install.yml | 4 ++-- roles/custom/matrix-bridge-sms/tasks/validate_config.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/custom/matrix-bridge-sms/tasks/setup_install.yml b/roles/custom/matrix-bridge-sms/tasks/setup_install.yml index 022bc22d9..b4ff93f86 100644 --- a/roles/custom/matrix-bridge-sms/tasks/setup_install.yml +++ b/roles/custom/matrix-bridge-sms/tasks/setup_install.yml @@ -11,9 +11,9 @@ --- - name: Ensure matrix-sms-bridge image is pulled - community.docker.docker_image: + community.docker.docker_image_pull: name: "{{ matrix_sms_bridge_container_image }}" - source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" + pull: always register: matrix_sms_bridge_container_image_pull_result retries: "{{ devture_playbook_help_container_retries_count }}" delay: "{{ devture_playbook_help_container_retries_delay }}" diff --git a/roles/custom/matrix-bridge-sms/tasks/validate_config.yml b/roles/custom/matrix-bridge-sms/tasks/validate_config.yml index 44960b820..ffa6c4caf 100644 --- a/roles/custom/matrix-bridge-sms/tasks/validate_config.yml +++ b/roles/custom/matrix-bridge-sms/tasks/validate_config.yml @@ -19,6 +19,7 @@ - {'old': 'matrix_sms_bridge_docker_image_registry_prefix_upstream', 'new': 'matrix_sms_bridge_container_image_registry_prefix_upstream'} - {'old': 'matrix_sms_bridge_docker_image_registry_prefix_upstream_default', 'new': 'matrix_sms_bridge_container_image_registry_prefix_upstream_default'} - {'old': 'matrix_sms_bridge_docker_image_tag', 'new': 'matrix_sms_bridge_container_image_tag'} + - {'old': 'matrix_sms_bridge_container_image_force_pull', 'new': ' (the new community.docker.docker_image_pull module handles this natively)'} - name: Fail if required matrix-bridge-sms settings not defined