3
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2026-02-28 18:03:10 +00:00

Rename _docker_ vars to _container_ for kakaotalk, telegram, synapse

These three roles have multiple variable prefixes each:
- kakaotalk: matrix_appservice_kakaotalk + matrix_appservice_kakaotalk_node
- telegram: matrix_mautrix_telegram + matrix_mautrix_telegram_lottieconverter
- synapse: matrix_synapse + matrix_synapse_customized + matrix_synapse_rust_synapse_compress_state

For each: renamed _docker_image* to _container_image* (and _docker_src*,
_docker_repo* where applicable), added deprecation entries in
validate_config.yml, updated group_vars references, and moved
deprecation tasks to the front of validate_config.yml.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Slavi Pantaleev
2026-02-18 08:15:24 +02:00
parent f0e0f5ec56
commit ca2b6b0a27
22 changed files with 263 additions and 218 deletions

View File

@@ -38,16 +38,16 @@
- name: Ensure Synapse repository is present on self-build
ansible.builtin.git:
repo: "{{ matrix_synapse_container_image_self_build_repo }}"
dest: "{{ matrix_synapse_docker_src_files_path }}"
version: "{{ matrix_synapse_docker_image.split(':')[1] }}"
dest: "{{ matrix_synapse_container_src_files_path }}"
version: "{{ matrix_synapse_container_image.split(':')[1] }}"
force: "yes"
become: true
become_user: "{{ matrix_synapse_username }}"
register: matrix_synapse_git_pull_results
- name: Check if Synapse Docker image exists
ansible.builtin.command: "{{ devture_systemd_docker_base_host_command_docker }} images --quiet --filter 'reference={{ matrix_synapse_docker_image }}'"
register: matrix_synapse_docker_image_check_result
ansible.builtin.command: "{{ devture_systemd_docker_base_host_command_docker }} images --quiet --filter 'reference={{ matrix_synapse_container_image }}'"
register: matrix_synapse_container_image_check_result
changed_when: false
# Invoking the `docker build` command here, instead of calling the `docker_image` Ansible module,
@@ -55,23 +55,23 @@
# See: https://github.com/ansible-collections/community.general/issues/514
- name: Ensure Synapse Docker image is built
ansible.builtin.shell:
chdir: "{{ matrix_synapse_docker_src_files_path }}"
chdir: "{{ matrix_synapse_container_src_files_path }}"
cmd: |
{{ devture_systemd_docker_base_host_command_docker }} build \
-t "{{ matrix_synapse_docker_image }}" \
-t "{{ matrix_synapse_container_image }}" \
-f docker/Dockerfile \
.
environment:
DOCKER_BUILDKIT: 1
changed_when: true
when: "matrix_synapse_git_pull_results.changed | bool or matrix_synapse_docker_image_check_result.stdout == ''"
when: "matrix_synapse_git_pull_results.changed | bool or matrix_synapse_container_image_check_result.stdout == ''"
- name: Ensure Synapse Docker image is pulled
community.docker.docker_image:
name: "{{ matrix_synapse_docker_image }}"
name: "{{ matrix_synapse_container_image }}"
source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}"
force_source: "{{ matrix_synapse_docker_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_synapse_docker_image_force_pull }}"
force_source: "{{ matrix_synapse_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_synapse_container_image_force_pull }}"
when: "not matrix_synapse_container_image_self_build"
register: result
retries: "{{ devture_playbook_help_container_retries_count }}"
@@ -83,7 +83,7 @@
- name: Ensure customizations Dockerfile is created
ansible.builtin.template:
src: "{{ role_path }}/templates/synapse/customizations/Dockerfile.j2"
dest: "{{ matrix_synapse_customized_docker_src_files_path }}/Dockerfile"
dest: "{{ matrix_synapse_customized_container_src_files_path }}/Dockerfile"
owner: "{{ matrix_synapse_uid }}"
group: "{{ matrix_synapse_gid }}"
mode: '0640'
@@ -91,13 +91,13 @@
- name: Ensure customized Docker image for Synapse is built
community.docker.docker_image:
name: "{{ matrix_synapse_docker_image_customized }}"
name: "{{ matrix_synapse_container_image_customized }}"
source: build
force_source: "{{ matrix_synapse_container_image_customizations_dockerfile_result.changed or matrix_synapse_docker_image_customized_force_source }}"
force_source: "{{ matrix_synapse_container_image_customizations_dockerfile_result.changed or matrix_synapse_container_image_customized_force_source }}"
build:
dockerfile: Dockerfile
path: "{{ matrix_synapse_customized_docker_src_files_path }}"
nocache: "{{ matrix_synapse_docker_image_customized_build_nocache }}"
path: "{{ matrix_synapse_customized_container_src_files_path }}"
nocache: "{{ matrix_synapse_container_image_customized_build_nocache }}"
# We do this so that the signing key would get generated.
#
@@ -118,7 +118,7 @@
-e SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
-e SYNAPSE_SERVER_NAME={{ matrix_server_fqn_matrix }}
-e SYNAPSE_REPORT_STATS=no
{{ matrix_synapse_docker_image }}
{{ matrix_synapse_container_image }}
generate
creates: "{{ matrix_synapse_config_dir_path }}/{{ matrix_server_fqn_matrix }}.signing.key"