Przeglądaj źródła

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) <noreply@anthropic.com>
pull/5192/head
Slavi Pantaleev 2 dni temu
rodzic
commit
b7d97d960d
3 zmienionych plików z 3 dodań i 5 usunięć
  1. +0
    -1
      roles/custom/matrix-authentication-service/defaults/main.yml
  2. +2
    -4
      roles/custom/matrix-authentication-service/tasks/install.yml
  3. +1
    -0
      roles/custom/matrix-authentication-service/tasks/validate_config.yml

+ 0
- 1
roles/custom/matrix-authentication-service/defaults/main.yml Wyświetl plik

@@ -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"


+ 2
- 4
roles/custom/matrix-authentication-service/tasks/install.yml Wyświetl plik

@@ -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 }}"


+ 1
- 0
roles/custom/matrix-authentication-service/tasks/validate_config.yml Wyświetl plik

@@ -53,3 +53,4 @@
- {'old': 'matrix_authentication_service_syn2mas_container_image_self_build', 'new': '<removed>'}
- {'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': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}

Ładowanie…
Anuluj
Zapisz