From f58d7b497ac02959244855c16fea3d21491473d3 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 4 May 2026 22:13:15 +0300 Subject: [PATCH] matrix-dendrite: 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-dendrite/defaults/main.yml | 1 - roles/custom/matrix-dendrite/tasks/setup_install.yml | 6 ++---- roles/custom/matrix-dendrite/tasks/validate_config.yml | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/roles/custom/matrix-dendrite/defaults/main.yml b/roles/custom/matrix-dendrite/defaults/main.yml index 4eb4c7f5f..35debaae4 100644 --- a/roles/custom/matrix-dendrite/defaults/main.yml +++ b/roles/custom/matrix-dendrite/defaults/main.yml @@ -30,7 +30,6 @@ matrix_dendrite_container_image_registry_prefix_upstream: "{{ matrix_dendrite_co matrix_dendrite_container_image_registry_prefix_upstream_default: docker.io/ # renovate: datasource=docker depName=matrixdotorg/dendrite-monolith matrix_dendrite_container_image_tag: "v0.15.2" -matrix_dendrite_container_image_force_pull: "{{ matrix_dendrite_container_image.endswith(':latest') }}" matrix_dendrite_base_path: "{{ matrix_base_data_path }}/dendrite" matrix_dendrite_config_dir_path: "{{ matrix_dendrite_base_path }}/config" diff --git a/roles/custom/matrix-dendrite/tasks/setup_install.yml b/roles/custom/matrix-dendrite/tasks/setup_install.yml index 117e715ff..d6f38c3d3 100644 --- a/roles/custom/matrix-dendrite/tasks/setup_install.yml +++ b/roles/custom/matrix-dendrite/tasks/setup_install.yml @@ -49,11 +49,9 @@ when: "not local_path_media_store_stat.failed and not local_path_media_store_stat.stat.exists" - name: Ensure Dendrite Docker image is pulled - community.docker.docker_image: + community.docker.docker_image_pull: name: "{{ matrix_dendrite_container_image }}" - source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" - force_source: "{{ matrix_dendrite_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_dendrite_container_image_force_pull }}" + pull: always when: "not matrix_dendrite_container_image_self_build | bool" register: matrix_dendrite_container_image_pull_result retries: "{{ devture_playbook_help_container_retries_count }}" diff --git a/roles/custom/matrix-dendrite/tasks/validate_config.yml b/roles/custom/matrix-dendrite/tasks/validate_config.yml index 5a8f8756a..1a2f4828d 100644 --- a/roles/custom/matrix-dendrite/tasks/validate_config.yml +++ b/roles/custom/matrix-dendrite/tasks/validate_config.yml @@ -43,6 +43,7 @@ - {'old': 'matrix_dendrite_docker_image_registry_prefix_upstream_default', 'new': 'matrix_dendrite_container_image_registry_prefix_upstream_default'} - {'old': 'matrix_dendrite_docker_image_tag', 'new': 'matrix_dendrite_container_image_tag'} - {'old': 'matrix_dendrite_docker_src_files_path', 'new': 'matrix_dendrite_container_src_files_path'} + - {'old': 'matrix_dendrite_container_image_force_pull', 'new': ' (the new community.docker.docker_image_pull module handles this natively)'} - name: Fail if required Dendrite settings not defined ansible.builtin.fail: