You've already forked matrix-docker-ansible-deploy
mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-08-04 21:43:06 +02:00
Explicitly tell template-lookup to not auto-parse JSON files
ansible-core>=2.19.0 only auto-parses YAML files, not JSON. Previous ansible-core versions auto-parsed JSON as well, but ansible-core>=2.19.0 doesn't, so we added a `from_json` post-filter. However, older versions auto-parsing JSON and turning it into a dict, on which we later run `from_json` is no good. In this patch, we try to equalize behavior and configure Ansible to never parse JSON, hopefully making old-Ansible behave like new Ansible. Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/4458 Ref: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_lookup.html#parameter-convert_data
This commit is contained in:
@ -320,7 +320,7 @@ matrix_client_element_setting_defaults_custom_themes: [] # noqa var-naming
|
||||
#
|
||||
# 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_client_element_configuration_default: "{{ lookup('template', 'templates/config.json.j2') | from_json }}"
|
||||
matrix_client_element_configuration_default: "{{ lookup('template', 'templates/config.json.j2', convert_data=False) | from_json }}"
|
||||
|
||||
# Your custom JSON configuration for Element Web should go to `matrix_client_element_configuration_extension_json`.
|
||||
# This configuration extends the default starting configuration (`matrix_client_element_configuration_default`).
|
||||
@ -358,7 +358,7 @@ matrix_client_element_location_sharing_enabled: false
|
||||
#
|
||||
# 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_client_element_location_sharing_map_style_default: "{{ lookup('template', 'templates/map_style.json.j2') | from_json }}"
|
||||
matrix_client_element_location_sharing_map_style_default: "{{ lookup('template', 'templates/map_style.json.j2', convert_data=False) | from_json }}"
|
||||
|
||||
# Your custom JSON configuration for Element location sharing map style should go to `matrix_client_element_location_sharing_map_style_extension_json`.
|
||||
# This configuration extends the default starting configuration (`matrix_client_element_location_sharing_map_style_default`).
|
||||
|
Reference in New Issue
Block a user