Browse Source

Add matrix-matrixto: adjust for matrix-docker-ansible-deploy

Signed-off-by: Suguru Hirahara <did🔑z6MkvVZk1A3KBApWJXv2Ju4H14ErDfRGxh8zxdXSZ4vACDg5>
pull/4750/head
Suguru Hirahara 3 months ago
parent
commit
1e62c07d96
No known key found for this signature in database GPG Key ID: E4F9743DAB4B7B75
4 changed files with 7 additions and 12 deletions
  1. +1
    -4
      roles/custom/matrix-matrixto/defaults/main.yml
  2. +5
    -5
      roles/custom/matrix-matrixto/tasks/install.yml
  3. +0
    -2
      roles/custom/matrix-matrixto/tasks/validate_config.yml
  4. +1
    -1
      roles/custom/matrix-matrixto/templates/systemd/matrix-matrixto.service.j2

+ 1
- 4
roles/custom/matrix-matrixto/defaults/main.yml View File

@@ -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.


+ 5
- 5
roles/custom/matrix-matrixto/tasks/install.yml View File

@@ -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"

+ 0
- 2
roles/custom/matrix-matrixto/tasks/validate_config.yml View File

@@ -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


roles/custom/matrix-matrixto/templates/systemd/matrixto.service.j2 → roles/custom/matrix-matrixto/templates/systemd/matrix-matrixto.service.j2 View File

@@ -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 }} \

Loading…
Cancel
Save