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
Pass the result of JSON-file template lookups through from_json
for better ansible-core>=2.19.0 compatibility
Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/4445 It seems like ansible-core 2.19.0 no longer automatically parses template lookup content as JSON (into a dict) when dealing with template files (be it `file.json.j2` or `file.j2`). For files detected to contain YAML (`.ya?ml.j2`, but possibly others), it automatically parses YAML, because the `convert_data` option for the template lookup defaults to `true`. Ref: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_lookup.html
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') }}"
|
||||
matrix_client_element_configuration_default: "{{ lookup('template', 'templates/config.json.j2') | 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') }}"
|
||||
matrix_client_element_location_sharing_map_style_default: "{{ lookup('template', 'templates/map_style.json.j2') | 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