mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-05-19 20:38:02 +00:00
matrix-element-admin: 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>
This commit is contained in:
@@ -32,11 +32,9 @@
|
||||
register: matrix_element_admin_support_files_result
|
||||
|
||||
- name: Ensure Element Admin container image is pulled
|
||||
community.docker.docker_image:
|
||||
community.docker.docker_image_pull:
|
||||
name: "{{ matrix_element_admin_container_image }}"
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
force_source: "{{ matrix_element_admin_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_element_admin_container_image_force_pull }}"
|
||||
pull: always
|
||||
when: "not matrix_element_admin_container_image_self_build | bool"
|
||||
register: matrix_element_admin_container_image_pull_result
|
||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||
|
||||
@@ -24,3 +24,11 @@
|
||||
Element Admin with a path prefix other than '/' is not supported yet.
|
||||
You have configured matrix_element_admin_path_prefix to '{{ matrix_element_admin_path_prefix }}'.
|
||||
when: "matrix_element_admin_path_prefix != '/'"
|
||||
|
||||
- name: (Deprecation) Catch and report renamed Element Admin 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_admin_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}
|
||||
|
||||
Reference in New Issue
Block a user