Преглед изворни кода

matrix-element-call: 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/4219/merge
Slavi Pantaleev пре 2 дана
родитељ
комит
a721125568
3 измењених фајлова са 10 додато и 4 уклоњено
  1. +0
    -1
      roles/custom/matrix-element-call/defaults/main.yml
  2. +2
    -3
      roles/custom/matrix-element-call/tasks/install.yml
  3. +8
    -0
      roles/custom/matrix-element-call/tasks/validate_config.yml

+ 0
- 1
roles/custom/matrix-element-call/defaults/main.yml Прегледај датотеку

@@ -39,7 +39,6 @@ matrix_element_call_container_image_registry_prefix: "{{ matrix_element_call_con
matrix_element_call_container_image_registry_prefix_upstream: "{{ matrix_element_call_container_image_registry_prefix_upstream_default }}" matrix_element_call_container_image_registry_prefix_upstream: "{{ matrix_element_call_container_image_registry_prefix_upstream_default }}"
matrix_element_call_container_image_registry_prefix_upstream_default: ghcr.io/ matrix_element_call_container_image_registry_prefix_upstream_default: ghcr.io/
matrix_element_call_container_image_tag: "{{ matrix_element_call_version }}" matrix_element_call_container_image_tag: "{{ matrix_element_call_version }}"
matrix_element_call_container_image_force_pull: "{{ matrix_element_call_container_image.endswith(':latest') }}"


matrix_element_call_container_network: matrix-element-call matrix_element_call_container_network: matrix-element-call




+ 2
- 3
roles/custom/matrix-element-call/tasks/install.yml Прегледај датотеку

@@ -35,10 +35,9 @@
register: matrix_element_call_support_files_result register: matrix_element_call_support_files_result


- name: Ensure Element Call container image is pulled - name: Ensure Element Call container image is pulled
community.docker.docker_image:
community.docker.docker_image_pull:
name: "{{ matrix_element_call_container_image }}" name: "{{ matrix_element_call_container_image }}"
source: pull
force_source: "{{ matrix_element_call_container_image_force_pull }}"
pull: always
register: matrix_element_call_container_image_pull_result register: matrix_element_call_container_image_pull_result
retries: "{{ devture_playbook_help_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ devture_playbook_help_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"


+ 8
- 0
roles/custom/matrix-element-call/tasks/validate_config.yml Прегледај датотеку

@@ -32,3 +32,11 @@
Element Call with a path prefix other than '/' is not supported yet. Element Call with a path prefix other than '/' is not supported yet.
You have configured matrix_element_call_path_prefix to '{{ matrix_element_call_path_prefix }}'. You have configured matrix_element_call_path_prefix to '{{ matrix_element_call_path_prefix }}'.
when: "matrix_element_call_path_prefix != '/'" when: "matrix_element_call_path_prefix != '/'"

- name: (Deprecation) Catch and report renamed Element Call variables
ansible.builtin.fail:
msg: >-
The variable `{{ item.old }}` is deprecated. Please use `{{ item.new }}` instead.
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
with_items:
- {'old': 'matrix_element_call_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}

Loading…
Откажи
Сачувај