Skip to content

Commit

Permalink
synapse-admin: remove deprecated vars, introduce matrix_synapse_admin…
Browse files Browse the repository at this point in the history
…_configuration_extension_json_auto
  • Loading branch information
aine-etke committed Dec 1, 2024
1 parent bc1849d commit dd31bf0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions roles/custom/matrix-synapse-admin/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ matrix_synapse_admin_path_prefix: /synapse-admin
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`.
Expand All @@ -169,7 +168,10 @@ matrix_synapse_admin_configuration_default:
# }
matrix_synapse_admin_configuration_extension_json: '{}'

matrix_synapse_admin_configuration_extension: "{{ matrix_synapse_admin_configuration_extension_json | from_json if matrix_synapse_admin_configuration_extension_json | from_json is mapping else {} }}"
# This is similar to `matrix_synapse_admin_configuration_extension_json`, but intended for use by playbook or group vars
matrix_synapse_admin_configuration_extension_json_auto: {}

matrix_synapse_admin_configuration_extension: "{{ matrix_synapse_admin_configuration_extension_json_auto | combine(matrix_synapse_admin_configuration_extension_json | from_json if matrix_synapse_admin_configuration_extension_json | from_json is mapping else {}, recursive=True) }}"

# Holds the final synapse-admin configuration (a combination of the default and its extension).
# You most likely don't need to touch this variable. Instead, see `matrix_synapse_admin_configuration_default`.
Expand All @@ -194,10 +196,6 @@ matrix_synapse_admin_config_restrictBaseUrl: "{{ [matrix_homeserver_url] }}" #
# ]
matrix_synapse_admin_config_menu: []

# Controls the supportURL configuration setting, which, if defined, replaces the default link to the Synapse Admin GitHub repository.
# DEPRECATED: use matrix_synapse_admin_config_menu instead (migrated automatically).
matrix_synapse_admin_config_supportURL: '' # noqa var-naming

# Controls the asManagedUsers configuration setting (managed by playbook), which, if defined,
# restricts modifications of the specified users (e.g., bridge-managed).
# You should use JS regex syntax to match the user IDs.
Expand Down

0 comments on commit dd31bf0

Please sign in to comment.