From 1e62c07d962d2aa13e4654d1039c402e9e5a0459 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sat, 22 Nov 2025 20:26:12 +0900 Subject: [PATCH] Add matrix-matrixto: adjust for matrix-docker-ansible-deploy Signed-off-by: Suguru Hirahara --- roles/custom/matrix-matrixto/defaults/main.yml | 5 +---- roles/custom/matrix-matrixto/tasks/install.yml | 10 +++++----- roles/custom/matrix-matrixto/tasks/validate_config.yml | 2 -- ...{matrixto.service.j2 => matrix-matrixto.service.j2} | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) rename roles/custom/matrix-matrixto/templates/systemd/{matrixto.service.j2 => matrix-matrixto.service.j2} (97%) diff --git a/roles/custom/matrix-matrixto/defaults/main.yml b/roles/custom/matrix-matrixto/defaults/main.yml index 2a8fcd1bf..748781ffe 100644 --- a/roles/custom/matrix-matrixto/defaults/main.yml +++ b/roles/custom/matrix-matrixto/defaults/main.yml @@ -11,14 +11,11 @@ matrixto_enabled: true -matrixto_identifier: matrixto +matrixto_identifier: matrix-matrixto matrixto_base_path: "/{{ matrixto_identifier }}" matrixto_version: 1.2.17-1 -matrixto_uid: "" -matrixto_gid: "" - matrixto_scheme: https # The hostname at which Matrix.to is served. diff --git a/roles/custom/matrix-matrixto/tasks/install.yml b/roles/custom/matrix-matrixto/tasks/install.yml index ac696146a..fa78fa33a 100644 --- a/roles/custom/matrix-matrixto/tasks/install.yml +++ b/roles/custom/matrix-matrixto/tasks/install.yml @@ -9,8 +9,8 @@ path: "{{ item }}" state: directory mode: "0750" - owner: "{{ matrixto_uid }}" - group: "{{ matrixto_gid }}" + owner: "{{ matrix_user_name }}" + group: "{{ matrix_group_name }}" with_items: - "{{ matrixto_base_path }}" @@ -19,8 +19,8 @@ src: "{{ role_path }}/templates/{{ item }}.j2" dest: "{{ matrixto_base_path }}/{{ item }}" mode: "0640" - owner: "{{ matrixto_uid }}" - group: "{{ matrixto_gid }}" + owner: "{{ matrix_user_name }}" + group: "{{ matrix_group_name }}" with_items: - env - labels @@ -95,6 +95,6 @@ - name: Ensure Matrix.to systemd service is present ansible.builtin.template: - src: "{{ role_path }}/templates/systemd/matrixto.service.j2" + src: "{{ role_path }}/templates/systemd/matrix-matrixto.service.j2" dest: "{{ devture_systemd_docker_base_systemd_path }}/{{ matrixto_identifier }}.service" mode: "0644" diff --git a/roles/custom/matrix-matrixto/tasks/validate_config.yml b/roles/custom/matrix-matrixto/tasks/validate_config.yml index 3273b6334..36d7806c0 100644 --- a/roles/custom/matrix-matrixto/tasks/validate_config.yml +++ b/roles/custom/matrix-matrixto/tasks/validate_config.yml @@ -10,8 +10,6 @@ You need to define a required configuration setting (`{{ item }}`). when: "lookup('vars', item, default='') | string | length == 0" with_items: - - matrixto_uid - - matrixto_gid - matrixto_hostname - matrixto_path_prefix - matrixto_container_network diff --git a/roles/custom/matrix-matrixto/templates/systemd/matrixto.service.j2 b/roles/custom/matrix-matrixto/templates/systemd/matrix-matrixto.service.j2 similarity index 97% rename from roles/custom/matrix-matrixto/templates/systemd/matrixto.service.j2 rename to roles/custom/matrix-matrixto/templates/systemd/matrix-matrixto.service.j2 index 8a33e2a36..a09f10b99 100644 --- a/roles/custom/matrix-matrixto/templates/systemd/matrixto.service.j2 +++ b/roles/custom/matrix-matrixto/templates/systemd/matrix-matrixto.service.j2 @@ -27,7 +27,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ --rm \ --name={{ matrixto_identifier }} \ --log-driver=none \ - --user={{ matrixto_uid }}:{{ matrixto_gid }} \ + --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --cap-drop=ALL \ --read-only \ --network={{ matrixto_container_network }} \