From 73ca281aee5c4959260e480bc8a8ef602c793d85 Mon Sep 17 00:00:00 2001 From: Jean-Marie Mineau Date: Sun, 6 Mar 2022 17:43:12 +0100 Subject: [PATCH] remove the need for as/hs secret --- README.md | 2 -- TODO.md | 1 - tasks/main.yml | 4 ++-- templates/config.yaml | 4 ++-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d91ffe4..b0aacbd 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,6 @@ ansible_managed: str, msg indicating a file managed by ansible matrix_server_name: the matrix server name matrix_bridge_facebook_postgre_user_pwd: **SECRET** pwd for connecting to the postgre db matrix_bridge_facebook_integration_manager_shared_secret: **SECRET** pwd for mautrix-manager. TODO: remove it -matrix_bridge_facebook_as_token: **SECRET** token generated automatically by the bridge (should be handle better at some point...) -matrix_bridge_facebook_hs_token: **SECRET** token generated automatically by the bridge (should be handle better at some point...) matrix_bridge_facebook_allowed_external_user: list of external users allow to use the bridge matrix_bridge_facebook_admins: list of admins ``` diff --git a/TODO.md b/TODO.md index b8abc77..b7e7c69 100644 --- a/TODO.md +++ b/TODO.md @@ -5,5 +5,4 @@ - Add link to postgres role - Move registration files to a registration folder - Use local bot avatar -- Better management of `matrix_bridge_facebook_as_token` and `matrix_bridge_facebook_hs_token` - Why [animated-styckers] and not [all]? diff --git a/tasks/main.yml b/tasks/main.yml index d5de29a..f511759 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -58,8 +58,8 @@ facebook_config: "{{ encoded_facebook_config.content | b64decode | from_yaml }}" - name: extract tokens set_fact: - matrix_bridge_facebook_as_token: "{{ facebook_config.msg.appservice.as_token }}" - matrix_bridge_facebook_hs_token: "{{ facebook_config.msg.appservice.as_token }}" + matrix_bridge_facebook_as_token: "{{ facebook_config.appservice.as_token }}" + matrix_bridge_facebook_hs_token: "{{ facebook_config.appservice.as_token }}" - name: print config debug: msg: "{{ matrix_bridge_facebook_as_token }}, {{ matrix_bridge_facebook_hs_token }}" diff --git a/templates/config.yaml b/templates/config.yaml index 8e0e594..b719757 100644 --- a/templates/config.yaml +++ b/templates/config.yaml @@ -76,8 +76,8 @@ appservice: ephemeral_events: false # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify. - as_token: {{ matrix_bridge_facebook_as_token }} - hs_token: {{ matrix_bridge_facebook_hs_token }} + as_token: "{{ matrix_bridge_facebook_as_token | default('This value is generated when generating the registration') }}" + hs_token: "{{ matrix_bridge_facebook_hs_token | default('This value is generated when generating the registration') }}" # Prometheus telemetry config. Requires prometheus-client to be installed. metrics: