mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-05-08 05:10:14 +03:00
matrix-client-commet: 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:
@@ -30,7 +30,6 @@ matrix_client_commet_container_image_self_build_repo: "https://github.com/commet
|
||||
matrix_client_commet_container_image_self_build_git_hash: ""
|
||||
matrix_client_commet_container_image_self_build_version_tag: "{{ matrix_client_commet_version }}"
|
||||
matrix_client_commet_container_image: "localhost/matrix-client-commet:{{ matrix_client_commet_version }}"
|
||||
matrix_client_commet_container_image_force_pull: "{{ matrix_client_commet_container_image.endswith(':latest') or matrix_client_commet_container_image.endswith(':main') }}"
|
||||
|
||||
# The in-container port nginx listens on
|
||||
matrix_client_commet_container_port: 8080
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
- install-all
|
||||
- install-client-commet
|
||||
block:
|
||||
- when: matrix_client_commet_enabled | bool
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||
|
||||
- when: matrix_client_commet_enabled | bool
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||
|
||||
|
||||
@@ -17,11 +17,9 @@
|
||||
- "{{ matrix_client_commet_config_path }}"
|
||||
|
||||
- name: Ensure Commet container image is pulled
|
||||
community.docker.docker_image:
|
||||
community.docker.docker_image_pull:
|
||||
name: "{{ matrix_client_commet_container_image }}"
|
||||
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
|
||||
force_source: "{{ matrix_client_commet_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_client_commet_container_image_force_pull }}"
|
||||
pull: always
|
||||
when: "not matrix_client_commet_container_image_self_build | bool"
|
||||
register: matrix_client_commet_image_pull_result
|
||||
retries: "{{ devture_playbook_help_container_retries_count }}"
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# SPDX-FileCopyrightText: 2026 MDAD project contributors
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
---
|
||||
- name: (Deprecation) Catch and report renamed matrix-client-commet 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_client_commet_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}
|
||||
Reference in New Issue
Block a user