5
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2026-07-19 16:14:09 +00:00

Rename matrix_heisenbridge_* variables to matrix_bridge_heisenbridge_*

Part of adopting a uniform naming policy for bridge variables,
where the variable prefix matches the role directory name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Slavi Pantaleev
2026-07-16 14:48:14 +03:00
parent 62b5375815
commit 6e4992a2fe
9 changed files with 147 additions and 147 deletions
@@ -12,15 +12,15 @@
- install-all
- install-heisenbridge
block:
- when: matrix_heisenbridge_enabled | bool
- when: matrix_bridge_heisenbridge_enabled | bool
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
- when: matrix_heisenbridge_enabled | bool
- when: matrix_bridge_heisenbridge_enabled | bool
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
- tags:
- setup-all
- setup-heisenbridge
block:
- when: not matrix_heisenbridge_enabled | bool
- when: not matrix_bridge_heisenbridge_enabled | bool
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
@@ -12,12 +12,12 @@
- name: Ensure Heisenbridge image is pulled
community.docker.docker_image_pull:
name: "{{ matrix_heisenbridge_container_image }}"
name: "{{ matrix_bridge_heisenbridge_container_image }}"
pull: always
register: matrix_heisenbridge_container_image_pull_result
register: matrix_bridge_heisenbridge_container_image_pull_result
retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ devture_playbook_help_container_retries_delay }}"
until: matrix_heisenbridge_container_image_pull_result is not failed
until: matrix_bridge_heisenbridge_container_image_pull_result is not failed
- name: Ensure Heisenbridge paths exist
ansible.builtin.file:
@@ -27,33 +27,33 @@
owner: "{{ matrix_user_name }}"
group: "{{ matrix_group_name }}"
with_items:
- "{{ matrix_heisenbridge_base_path }}"
- "{{ matrix_bridge_heisenbridge_base_path }}"
- name: Ensure Heisenbridge registration.yaml installed if provided
ansible.builtin.copy:
content: "{{ matrix_heisenbridge_registration | to_nice_yaml(indent=2, width=999999) }}"
dest: "{{ matrix_heisenbridge_base_path }}/registration.yaml"
content: "{{ matrix_bridge_heisenbridge_registration | to_nice_yaml(indent=2, width=999999) }}"
dest: "{{ matrix_bridge_heisenbridge_base_path }}/registration.yaml"
mode: '0644'
owner: "{{ matrix_user_name }}"
group: "{{ matrix_group_name }}"
register: matrix_heisenbridge_registration_result
register: matrix_bridge_heisenbridge_registration_result
- name: Ensure Heisenbridge support files installed
ansible.builtin.template:
src: "{{ role_path }}/templates/{{ item }}.j2"
dest: "{{ matrix_heisenbridge_base_path }}/{{ item }}"
dest: "{{ matrix_bridge_heisenbridge_base_path }}/{{ item }}"
mode: '0640'
owner: "{{ matrix_user_name }}"
group: "{{ matrix_group_name }}"
with_items:
- labels
register: matrix_heisenbridge_support_files_result
register: matrix_bridge_heisenbridge_support_files_result
- name: Ensure Heisenbridge container network is created
when: matrix_heisenbridge_container_network != 'host'
when: matrix_bridge_heisenbridge_container_network != 'host'
community.general.docker_network:
enable_ipv6: "{{ devture_systemd_docker_base_ipv6_enabled }}"
name: "{{ matrix_heisenbridge_container_network }}"
name: "{{ matrix_bridge_heisenbridge_container_network }}"
driver: bridge
driver_options: "{{ devture_systemd_docker_base_container_networks_driver_options }}"
@@ -62,14 +62,14 @@
src: "{{ role_path }}/templates/systemd/matrix-heisenbridge.service.j2"
dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-heisenbridge.service"
mode: '0644'
register: matrix_heisenbridge_systemd_service_result
register: matrix_bridge_heisenbridge_systemd_service_result
- name: Determine whether matrix-heisenbridge needs a restart
ansible.builtin.set_fact:
matrix_heisenbridge_restart_necessary: >-
matrix_bridge_heisenbridge_restart_necessary: >-
{{
matrix_heisenbridge_registration_result.changed | default(false)
or matrix_heisenbridge_support_files_result.changed | default(false)
or matrix_heisenbridge_systemd_service_result.changed | default(false)
or matrix_heisenbridge_container_image_pull_result.changed | default(false)
matrix_bridge_heisenbridge_registration_result.changed | default(false)
or matrix_bridge_heisenbridge_support_files_result.changed | default(false)
or matrix_bridge_heisenbridge_systemd_service_result.changed | default(false)
or matrix_bridge_heisenbridge_container_image_pull_result.changed | default(false)
}}
@@ -10,9 +10,9 @@
- name: Check existence of matrix-heisenbridge service
ansible.builtin.stat:
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-heisenbridge.service"
register: matrix_heisenbridge_service_stat
register: matrix_bridge_heisenbridge_service_stat
- when: matrix_heisenbridge_service_stat.stat.exists | bool
- when: matrix_bridge_heisenbridge_service_stat.stat.exists | bool
block:
- name: Ensure matrix-heisenbridge is stopped
ansible.builtin.service:
@@ -12,12 +12,12 @@
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
with_items:
- {'old': 'matrix_heisenbridge_docker_image', 'new': 'matrix_heisenbridge_container_image'}
- {'old': 'matrix_heisenbridge_docker_image_force_pull', 'new': 'matrix_heisenbridge_container_image_force_pull'}
- {'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)'}
- {'old': 'matrix_bridge_heisenbridge_docker_image', 'new': 'matrix_bridge_heisenbridge_container_image'}
- {'old': 'matrix_bridge_heisenbridge_docker_image_force_pull', 'new': 'matrix_bridge_heisenbridge_container_image_force_pull'}
- {'old': 'matrix_bridge_heisenbridge_docker_image_registry_prefix', 'new': 'matrix_bridge_heisenbridge_container_image_registry_prefix'}
- {'old': 'matrix_bridge_heisenbridge_docker_image_registry_prefix_upstream', 'new': 'matrix_bridge_heisenbridge_container_image_registry_prefix_upstream'}
- {'old': 'matrix_bridge_heisenbridge_docker_image_registry_prefix_upstream_default', 'new': 'matrix_bridge_heisenbridge_container_image_registry_prefix_upstream_default'}
- {'old': 'matrix_bridge_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
@@ -26,5 +26,5 @@
You need to define a required configuration setting (`{{ item.name }}`).
when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
with_items:
- {'name': 'matrix_heisenbridge_container_network', when: true}
- {'name': 'matrix_heisenbridge_homeserver_url', when: true}
- {'name': 'matrix_bridge_heisenbridge_container_network', when: true}
- {'name': 'matrix_bridge_heisenbridge_homeserver_url', when: true}