Procházet zdrojové kódy

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 před 1 měsícem
rodič
revize
f58d7b497a
3 změnil soubory, kde provedl 3 přidání a 5 odebrání
  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 Zobrazit soubor

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


+ 2
- 4
roles/custom/matrix-dendrite/tasks/setup_install.yml Zobrazit soubor

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


+ 1
- 0
roles/custom/matrix-dendrite/tasks/validate_config.yml Zobrazit soubor

@@ -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': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}

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


Načítá se…
Zrušit
Uložit