소스 검색

synapse-admin: get rid of lookup and config duplicate var

pull/3763/head
Aine 1 년 전
부모
커밋
7a77d84276
No known key found for this signature in database GPG 키 ID: 34969C908CCA2804
4개의 변경된 파일6개의 추가작업 그리고 22개의 파일을 삭제
  1. +1
    -1
      group_vars/matrix_servers
  2. +5
    -1
      roles/custom/matrix-synapse-admin/defaults/main.yml
  3. +0
    -6
      roles/custom/matrix-synapse-admin/templates/config.json.j2
  4. +0
    -14
      roles/custom/matrix-synapse-admin/vars/main.yml

+ 1
- 1
group_vars/matrix_servers 파일 보기

@@ -5884,7 +5884,7 @@ matrix_static_files_file_matrix_client_property_m_tile_server_map_style_url: "{{

# We set this regardless of whether synapse-admin is enabled, because people may wish to use a hosted (externally) synapse-admin installation and still have it auto-configured.
# See: https://github.com/etkecc/synapse-admin/pull/126
matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin_auto: "{{ matrix_synapse_admin_well_known_client_configuration if matrix_homeserver_implementation == 'synapse' else {} }}"
matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin_auto: "{{ matrix_synapse_admin_configuration if matrix_homeserver_implementation == 'synapse' else {} }}"

matrix_static_files_file_matrix_server_property_m_server: "{{ matrix_server_fqn_matrix_federation }}:{{ matrix_federation_public_port }}"



+ 5
- 1
roles/custom/matrix-synapse-admin/defaults/main.yml 파일 보기

@@ -146,7 +146,11 @@ matrix_synapse_admin_path_prefix: /synapse-admin
#
# The side-effect of this lookup is that Ansible would even parse the JSON for us, returning a dict.
# This is unlike what it does when looking up YAML template files (no automatic parsing there).
matrix_synapse_admin_configuration_default: "{{ lookup('template', 'templates/config.json.j2') }}"
matrix_synapse_admin_configuration_default:
restrictBaseUrl: "{{ matrix_synapse_admin_config_restrictBaseUrl }}"
asManagedUsers: "{{ matrix_synapse_admin_config_asManagedUsers }}"
supportURL: "{{ matrix_synapse_admin_config_supportURL }}"
menu: "{{ matrix_synapse_admin_config_menu }}"

# Your custom JSON configuration for synapse-admin should go to `matrix_synapse_admin_configuration_extension_json`.
# This configuration extends the default starting configuration (`matrix_synapse_admin_configuration_default`).


+ 0
- 6
roles/custom/matrix-synapse-admin/templates/config.json.j2 파일 보기

@@ -1,6 +0,0 @@
{
"restrictBaseUrl": {{ matrix_synapse_admin_config_restrictBaseUrl | to_json }},
"asManagedUsers": {{ matrix_synapse_admin_config_asManagedUsers | to_json }},
"supportURL": {{ matrix_synapse_admin_config_supportURL | to_json }},
"menu": {{ matrix_synapse_admin_config_menu | to_json }},
}

+ 0
- 14
roles/custom/matrix-synapse-admin/vars/main.yml 파일 보기

@@ -1,14 +0,0 @@
---

# Configuration that can be injected into a `/.well-known/matrix/client` file,
# to let synapse-admin users use any synapse-admin instance and still get synapse-admin auto-configured correctly.
# See: https://github.com/etkecc/synapse-admin/pull/126
#
# This duplicates `roles/custom/matrix-synapse-admin/templates/config.json.j2` and is usable by other roles directly.
# Alternatively, `matrix_synapse_admin_configuration` may have been used instead of this variable, but that one does not work reliably
# when used outside the context of this role, because `lookup('template', 'templates/config.json.j2')` only does the right thing in the context of this role.
matrix_synapse_admin_well_known_client_configuration:
restrictBaseUrl: "{{ matrix_synapse_admin_config_restrictBaseUrl }}"
asManagedUsers: "{{ matrix_synapse_admin_config_asManagedUsers }}"
supportURL: "{{ matrix_synapse_admin_config_supportURL }}"
menu: "{{ matrix_synapse_admin_config_menu }}"

불러오는 중...
취소
저장