Просмотр исходного кода

Implement feedback from PR #1931

pull/1931/head
teutat3s 3 лет назад
Родитель
Сommit
32a604d7c1
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: 18DAE600A6BBE705
5 измененных файлов: 19 добавлений и 24 удалений
  1. +9
    -17
      docs/configuring-well-known.md
  2. +6
    -5
      roles/matrix-base/defaults/main.yml
  3. +1
    -0
      roles/matrix-base/tasks/setup_well_known.yml
  4. +2
    -2
      roles/matrix-base/templates/static-files/well-known/matrix-support.j2
  5. +1
    -0
      roles/matrix-nginx-proxy/tasks/setup_well_known.yml

+ 9
- 17
docs/configuring-well-known.md Просмотреть файл

@@ -47,23 +47,15 @@ The two playbook variables that you could look for, if you're interested in bein
Example snippet for `vars.yml`: Example snippet for `vars.yml`:
``` ```
# Homeserver admin contacts as per MSC 1929 https://github.com/matrix-org/matrix-spec-proposals/pull/1929 # Homeserver admin contacts as per MSC 1929 https://github.com/matrix-org/matrix-spec-proposals/pull/1929
matrix_homeserver_admin_contacts: |
[
{
"matrix_id": "@admin1:domain.tld",
"email_address": "admin@domain.tld",
"role": "admin"
},
{
"matrix_id": "@admin2:domain.tld",
"email_address": "admin@domain.tld",
"role": "admin"
},
{
"email_address": "security@domain.tld",
"role": "security"
}
]
matrix_homeserver_admin_contacts:
- matrix_id: @admin1:domain.tld
email_address: admin@domain.tld
role: admin
- matrix_id: @admin2:domain.tld
email_address: admin@domain.tld
role: admin
- email_address: security@domain.tld
role: security


matrix_homeserver_support_url: "https://example.domain.tld/support" matrix_homeserver_support_url: "https://example.domain.tld/support"
``` ```


+ 6
- 5
roles/matrix-base/defaults/main.yml Просмотреть файл

@@ -14,12 +14,13 @@ matrix_admin: ''


# Homeserver admin contacts and support page as per MSC 1929 # Homeserver admin contacts and support page as per MSC 1929
# See: https://github.com/matrix-org/matrix-spec-proposals/pull/1929 # See: https://github.com/matrix-org/matrix-spec-proposals/pull/1929
#
# Users in form: # Users in form:
# [
# { "matrix_id": "@admin:domain.tld", "email_address": "admin@domain.tld", "role": "admin" },
# { "email_address": "security@domain.tld", "role": "security" }
# ]
# matrix_homeserver_admin_contacts:
# - matrix_id: @admin:domain.tld
# email_address: admin@domain.tld
# role: admin
# - email_address: security@domain.tld
# role: security
matrix_homeserver_admin_contacts: [] matrix_homeserver_admin_contacts: []
# Url string like https://domain.tld/support.html # Url string like https://domain.tld/support.html
matrix_homeserver_support_url: '' matrix_homeserver_support_url: ''


+ 1
- 0
roles/matrix-base/tasks/setup_well_known.yml Просмотреть файл

@@ -43,3 +43,4 @@
mode: 0644 mode: 0644
owner: "{{ matrix_user_username }}" owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}" group: "{{ matrix_user_groupname }}"
when: matrix_homeserver_admin_contacts|length > 0

+ 2
- 2
roles/matrix-base/templates/static-files/well-known/matrix-support.j2 Просмотреть файл

@@ -1,7 +1,7 @@
#jinja2: lstrip_blocks: "True" #jinja2: lstrip_blocks: "True"
{ {
{% if matrix_homeserver_admin_contacts %}
"admins": {{ matrix_homeserver_admin_contacts }}
{% if matrix_homeserver_admin_contacts|length > 0 %}
"admins": {{ matrix_homeserver_admin_contacts|to_json }}
{% endif %} {% endif %}
{% if matrix_homeserver_support_url %}, {% if matrix_homeserver_support_url %},
"support_page": "{{ matrix_homeserver_support_url }}" "support_page": "{{ matrix_homeserver_support_url }}"


+ 1
- 0
roles/matrix-nginx-proxy/tasks/setup_well_known.yml Просмотреть файл

@@ -31,3 +31,4 @@
mode: 0644 mode: 0644
owner: "{{ matrix_user_username }}" owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}" group: "{{ matrix_user_groupname }}"
when: matrix_homeserver_admin_contacts|length > 0

Загрузка…
Отмена
Сохранить