Bladeren bron

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) <noreply@anthropic.com>
pull/5192/head
Slavi Pantaleev 1 maand geleden
bovenliggende
commit
f58d7b497a
3 gewijzigde bestanden met toevoegingen van 3 en 5 verwijderingen
  1. +0
    -1
      roles/custom/matrix-dendrite/defaults/main.yml
  2. +2
    -4
      roles/custom/matrix-dendrite/tasks/setup_install.yml
  3. +1
    -0
      roles/custom/matrix-dendrite/tasks/validate_config.yml

+ 0
- 1
roles/custom/matrix-dendrite/defaults/main.yml Bestand weergeven

@@ -30,7 +30,6 @@ matrix_dendrite_container_image_registry_prefix_upstream: "{{ matrix_dendrite_co
matrix_dendrite_container_image_registry_prefix_upstream_default: docker.io/ matrix_dendrite_container_image_registry_prefix_upstream_default: docker.io/
# renovate: datasource=docker depName=matrixdotorg/dendrite-monolith # renovate: datasource=docker depName=matrixdotorg/dendrite-monolith
matrix_dendrite_container_image_tag: "v0.15.2" 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_base_path: "{{ matrix_base_data_path }}/dendrite"
matrix_dendrite_config_dir_path: "{{ matrix_dendrite_base_path }}/config" matrix_dendrite_config_dir_path: "{{ matrix_dendrite_base_path }}/config"


+ 2
- 4
roles/custom/matrix-dendrite/tasks/setup_install.yml Bestand weergeven

@@ -49,11 +49,9 @@
when: "not local_path_media_store_stat.failed and not local_path_media_store_stat.stat.exists" when: "not local_path_media_store_stat.failed and not local_path_media_store_stat.stat.exists"


- name: Ensure Dendrite Docker image is pulled - name: Ensure Dendrite Docker image is pulled
community.docker.docker_image:
community.docker.docker_image_pull:
name: "{{ matrix_dendrite_container_image }}" 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" when: "not matrix_dendrite_container_image_self_build | bool"
register: matrix_dendrite_container_image_pull_result register: matrix_dendrite_container_image_pull_result
retries: "{{ devture_playbook_help_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"


+ 1
- 0
roles/custom/matrix-dendrite/tasks/validate_config.yml Bestand weergeven

@@ -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_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_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_docker_src_files_path', 'new': 'matrix_dendrite_container_src_files_path'}
- {'old': 'matrix_dendrite_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}


- name: Fail if required Dendrite settings not defined - name: Fail if required Dendrite settings not defined
ansible.builtin.fail: ansible.builtin.fail:


Laden…
Annuleren
Opslaan