Explorar el Código

matrix-bridge-heisenbridge: 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 hace 2 días
padre
commit
5affe5fdd4
Se han modificado 3 ficheros con 3 adiciones y 5 borrados
  1. +0
    -1
      roles/custom/matrix-bridge-heisenbridge/defaults/main.yml
  2. +2
    -4
      roles/custom/matrix-bridge-heisenbridge/tasks/setup_install.yml
  3. +1
    -0
      roles/custom/matrix-bridge-heisenbridge/tasks/validate_config.yml

+ 0
- 1
roles/custom/matrix-bridge-heisenbridge/defaults/main.yml Ver fichero

@@ -24,7 +24,6 @@ matrix_heisenbridge_container_image: "{{ matrix_heisenbridge_container_image_reg
matrix_heisenbridge_container_image_registry_prefix: "{{ matrix_heisenbridge_container_image_registry_prefix_upstream }}"
matrix_heisenbridge_container_image_registry_prefix_upstream: "{{ matrix_heisenbridge_container_image_registry_prefix_upstream_default }}"
matrix_heisenbridge_container_image_registry_prefix_upstream_default: "docker.io/"
matrix_heisenbridge_container_image_force_pull: "{{ matrix_heisenbridge_container_image.endswith(':latest') }}"

# Set this to your Matrix ID if you want to enforce the owner, otherwise first _local_ user becomes one
matrix_heisenbridge_owner: ""


+ 2
- 4
roles/custom/matrix-bridge-heisenbridge/tasks/setup_install.yml Ver fichero

@@ -11,11 +11,9 @@
---

- name: Ensure Heisenbridge image is pulled
community.docker.docker_image:
community.docker.docker_image_pull:
name: "{{ matrix_heisenbridge_container_image }}"
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
force_source: "{{ matrix_heisenbridge_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_heisenbridge_container_image_force_pull }}"
pull: always
register: matrix_heisenbridge_container_image_pull_result
retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ devture_playbook_help_container_retries_delay }}"


+ 1
- 0
roles/custom/matrix-bridge-heisenbridge/tasks/validate_config.yml Ver fichero

@@ -17,6 +17,7 @@
- {'old': 'matrix_heisenbridge_docker_image_registry_prefix', 'new': 'matrix_heisenbridge_container_image_registry_prefix'}
- {'old': 'matrix_heisenbridge_docker_image_registry_prefix_upstream', 'new': 'matrix_heisenbridge_container_image_registry_prefix_upstream'}
- {'old': 'matrix_heisenbridge_docker_image_registry_prefix_upstream_default', 'new': 'matrix_heisenbridge_container_image_registry_prefix_upstream_default'}
- {'old': 'matrix_heisenbridge_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}


- name: Fail if required Heisenbridge settings not defined


Cargando…
Cancelar
Guardar