From b7d97d960da9f0fc3a411ea948893bb89ea23f42 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 4 May 2026 21:38:25 +0300 Subject: [PATCH] matrix-authentication-service: 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) --- .../custom/matrix-authentication-service/defaults/main.yml | 1 - .../custom/matrix-authentication-service/tasks/install.yml | 6 ++---- .../matrix-authentication-service/tasks/validate_config.yml | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/roles/custom/matrix-authentication-service/defaults/main.yml b/roles/custom/matrix-authentication-service/defaults/main.yml index e3dfbad09..6b8bb24d5 100644 --- a/roles/custom/matrix-authentication-service/defaults/main.yml +++ b/roles/custom/matrix-authentication-service/defaults/main.yml @@ -27,7 +27,6 @@ matrix_authentication_service_container_image_registry_prefix: "{{ 'localhost/' matrix_authentication_service_container_image_registry_prefix_upstream: "{{ matrix_authentication_service_container_image_registry_prefix_upstream_default }}" matrix_authentication_service_container_image_registry_prefix_upstream_default: "ghcr.io/" matrix_authentication_service_container_image: "{{ matrix_authentication_service_container_image_registry_prefix }}element-hq/matrix-authentication-service:{{ matrix_authentication_service_version }}" -matrix_authentication_service_container_image_force_pull: "{{ matrix_authentication_service_container_image.endswith(':latest') }}" matrix_authentication_service_base_path: "{{ matrix_base_data_path }}/matrix-authentication-service" matrix_authentication_service_bin_path: "{{ matrix_authentication_service_base_path }}/bin" diff --git a/roles/custom/matrix-authentication-service/tasks/install.yml b/roles/custom/matrix-authentication-service/tasks/install.yml index a291b5039..546fc4802 100644 --- a/roles/custom/matrix-authentication-service/tasks/install.yml +++ b/roles/custom/matrix-authentication-service/tasks/install.yml @@ -84,11 +84,9 @@ register: matrix_authentication_service_support_files_result - name: Ensure Matrix Authentication Service container image is pulled - community.docker.docker_image: + community.docker.docker_image_pull: name: "{{ matrix_authentication_service_container_image }}" - source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" - force_source: "{{ matrix_authentication_service_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_authentication_service_container_image_force_pull }}" + pull: always when: "not matrix_authentication_service_container_image_self_build | bool" register: matrix_authentication_service_container_image_pull_result retries: "{{ devture_playbook_help_container_retries_count }}" diff --git a/roles/custom/matrix-authentication-service/tasks/validate_config.yml b/roles/custom/matrix-authentication-service/tasks/validate_config.yml index 1dd005047..95b33499f 100644 --- a/roles/custom/matrix-authentication-service/tasks/validate_config.yml +++ b/roles/custom/matrix-authentication-service/tasks/validate_config.yml @@ -53,3 +53,4 @@ - {'old': 'matrix_authentication_service_syn2mas_container_image_self_build', 'new': ''} - {'old': 'matrix_authentication_service_syn2mas_process_extra_arguments', 'new': 'matrix_authentication_service_syn2mas_command_extra_options or matrix_authentication_service_syn2mas_subcommand_extra_options'} - {'old': 'matrix_authentication_service_syn2mas_dry_run', 'new': 'matrix_authentication_service_syn2mas_migrate_dry_run'} + - {'old': 'matrix_authentication_service_container_image_force_pull', 'new': ' (the new community.docker.docker_image_pull module handles this natively)'}