From 616079779fe69cec83f2815719231d22e6ba4243 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Thu, 12 Feb 2026 21:26:33 +0900 Subject: [PATCH] Replace `hydrogen_data_path` with `hydrogen_base_path` Signed-off-by: Suguru Hirahara --- group_vars/matrix_servers | 2 ++ roles/custom/matrix-client-hydrogen/defaults/main.yml | 4 ++-- roles/custom/matrix-client-hydrogen/tasks/setup_install.yml | 6 +++--- .../custom/matrix-client-hydrogen/tasks/setup_uninstall.yml | 2 +- .../templates/systemd/matrix-client-hydrogen.service.j2 | 6 +++--- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 20999c77a..c5e5b4367 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -4157,6 +4157,8 @@ hydrogen_default_hs_url: "{{ matrix_homeserver_url }}" hydrogen_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}" +hydrogen_base_path: "{{ matrix_base_data_path }}/client-hydrogen" + ###################################################################### # # /hydrogen diff --git a/roles/custom/matrix-client-hydrogen/defaults/main.yml b/roles/custom/matrix-client-hydrogen/defaults/main.yml index c4dd418e4..56b21ae21 100644 --- a/roles/custom/matrix-client-hydrogen/defaults/main.yml +++ b/roles/custom/matrix-client-hydrogen/defaults/main.yml @@ -23,8 +23,8 @@ hydrogen_container_image: "{{ hydrogen_container_image_registry_prefix }}element hydrogen_container_image_registry_prefix_upstream_default: ghcr.io/ hydrogen_container_image_force_pull: "{{ hydrogen_container_image.endswith(':latest') }}" -hydrogen_data_path: "{{ matrix_base_data_path }}/client-hydrogen" -hydrogen_docker_src_files_path: "{{ hydrogen_data_path }}/docker-src" +hydrogen_base_path: "{{ matrix_base_data_path }}/client-hydrogen" +hydrogen_docker_src_files_path: "{{ hydrogen_base_path }}/docker-src" # The base container network hydrogen_container_network: '' diff --git a/roles/custom/matrix-client-hydrogen/tasks/setup_install.yml b/roles/custom/matrix-client-hydrogen/tasks/setup_install.yml index a6a3a6e4a..ae5e72e51 100644 --- a/roles/custom/matrix-client-hydrogen/tasks/setup_install.yml +++ b/roles/custom/matrix-client-hydrogen/tasks/setup_install.yml @@ -19,7 +19,7 @@ owner: "{{ matrix_user_name }}" group: "{{ matrix_group_name }}" with_items: - - {path: "{{ hydrogen_data_path }}", when: true} + - {path: "{{ hydrogen_base_path }}", when: true} - {path: "{{ hydrogen_docker_src_files_path }}", when: "{{ hydrogen_container_image_self_build }}"} when: "item.when | bool" @@ -71,7 +71,7 @@ - name: Ensure Hydrogen configuration installed ansible.builtin.copy: content: "{{ hydrogen_configuration | to_nice_json }}" - dest: "{{ hydrogen_data_path }}/config.json" + dest: "{{ hydrogen_base_path }}/config.json" mode: 0644 owner: "{{ matrix_user_name }}" group: "{{ matrix_group_name }}" @@ -79,7 +79,7 @@ - name: Ensure Hydrogen additional config files installed ansible.builtin.template: src: "{{ item.src }}" - dest: "{{ hydrogen_data_path }}/{{ item.name }}" + dest: "{{ hydrogen_base_path }}/{{ item.name }}" mode: 0644 owner: "{{ matrix_user_name }}" group: "{{ matrix_group_name }}" diff --git a/roles/custom/matrix-client-hydrogen/tasks/setup_uninstall.yml b/roles/custom/matrix-client-hydrogen/tasks/setup_uninstall.yml index 460e6bc85..9a45f0fa6 100644 --- a/roles/custom/matrix-client-hydrogen/tasks/setup_uninstall.yml +++ b/roles/custom/matrix-client-hydrogen/tasks/setup_uninstall.yml @@ -27,5 +27,5 @@ - name: Ensure Hydrogen paths doesn't exist ansible.builtin.file: - path: "{{ hydrogen_data_path }}" + path: "{{ hydrogen_base_path }}" state: absent diff --git a/roles/custom/matrix-client-hydrogen/templates/systemd/matrix-client-hydrogen.service.j2 b/roles/custom/matrix-client-hydrogen/templates/systemd/matrix-client-hydrogen.service.j2 index 129bd15cf..1edf194fb 100644 --- a/roles/custom/matrix-client-hydrogen/templates/systemd/matrix-client-hydrogen.service.j2 +++ b/roles/custom/matrix-client-hydrogen/templates/systemd/matrix-client-hydrogen.service.j2 @@ -24,10 +24,10 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ {% if hydrogen_container_http_host_bind_port %} -p {{ hydrogen_container_http_host_bind_port }}:8080 \ {% endif %} - --label-file={{ hydrogen_data_path }}/labels \ + --label-file={{ hydrogen_base_path }}/labels \ --tmpfs=/tmp:rw,noexec,nosuid,size=10m \ - --mount type=bind,src={{ hydrogen_data_path }}/nginx.conf,dst=/etc/nginx/nginx.conf,ro \ - --mount type=bind,src={{ hydrogen_data_path }}/config.json,dst=/config.json.bundled,ro \ + --mount type=bind,src={{ hydrogen_base_path }}/nginx.conf,dst=/etc/nginx/nginx.conf,ro \ + --mount type=bind,src={{ hydrogen_base_path }}/config.json,dst=/config.json.bundled,ro \ {% for arg in hydrogen_container_extra_arguments %} {{ arg }} \ {% endfor %}