Browse Source

Fix rare YAML parsing problems in Dimension config

It's been reported that YAML parsing errors
would occur on certain Ansible/Python combinations for some reason.

It appears that a bare `{{ matrix_dimension_admins }}` would sometimes
yield things like `[u'@user:domain.com', ..]` (note the `u` string prefix).

To prevent such problems, we now explicitly serialize with `|to_json`.
pull/113/head
Slavi Pantaleev 7 years ago
parent
commit
4067e09409
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      roles/matrix-dimension/defaults/main.yml

+ 3
- 3
roles/matrix-dimension/defaults/main.yml View File

@@ -61,7 +61,7 @@ matrix_dimension_configuration_yaml: |


# These users can modify the integrations this Dimension supports. # These users can modify the integrations this Dimension supports.
# To access the admin interface, open Dimension in Riot and click the settings icon. # To access the admin interface, open Dimension in Riot and click the settings icon.
admins: {{ matrix_dimension_admins }}
admins: {{ matrix_dimension_admins|to_json }}


# IPs and CIDR ranges listed here will be blocked from being widgets. # IPs and CIDR ranges listed here will be blocked from being widgets.
# Note: Widgets may still be embedded with restricted content, although not through Dimension directly. # Note: Widgets may still be embedded with restricted content, although not through Dimension directly.
@@ -101,7 +101,7 @@ matrix_dimension_configuration_yaml: |
fileLevel: info fileLevel: info
rotate: rotate:
size: 52428800 # bytes, default is 50mb size: 52428800 # bytes, default is 50mb
count: 5
count: 5




matrix_dimension_configuration_extension_yaml: | matrix_dimension_configuration_extension_yaml: |
@@ -117,7 +117,7 @@ matrix_dimension_configuration_extension_yaml: |
# telegram: # telegram:
# botToken: "YourTokenHere" # botToken: "YourTokenHere"
# #


# Holds the final Dimension configuration (a combination of the default and its extension). # Holds the final Dimension configuration (a combination of the default and its extension).
# You most likely don't need to touch this variable. Instead, see `matrix_dimension_configuration_yaml`. # You most likely don't need to touch this variable. Instead, see `matrix_dimension_configuration_yaml`.


Loading…
Cancel
Save