From 5b2282de27674c31489d590fdeda9c200948b822 Mon Sep 17 00:00:00 2001
From: Suguru Hirahara <acioustick@noreply.codeberg.org>
Date: Sun, 29 Dec 2024 13:07:04 -0500
Subject: [PATCH 1/5] Update docs/configuring-playbook-bridge-hookshot.md: add
 the common section "Extending the configuration"

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
---
 docs/configuring-playbook-bridge-hookshot.md | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/docs/configuring-playbook-bridge-hookshot.md b/docs/configuring-playbook-bridge-hookshot.md
index e0f852f1c..2cb197156 100644
--- a/docs/configuring-playbook-bridge-hookshot.md
+++ b/docs/configuring-playbook-bridge-hookshot.md
@@ -38,7 +38,12 @@ Take special note of the `matrix_hookshot_*_enabled` variables. Services that ne
 
 ### Extending the configuration
 
-You can configure additional options by adding the `matrix_hookshot_configuration_extension_yaml` and `matrix_hookshot_registration_extension_yaml` variables.
+There are some additional things you may wish to configure about the bridge.
+
+Take a look at:
+
+- `roles/custom/matrix-bridge-hookshot/defaults/main.yml` for some variables that you can customize via your `vars.yml` file
+- `roles/custom/matrix-bridge-hookshot/templates/config.yml.j2` for the bridge's default configuration. You can override settings (even those that don't have dedicated playbook variables) using the `matrix_hookshot_configuration_extension_yaml` and `matrix_hookshot_registration_extension_yaml` variables
 
 Refer the [official instructions](https://matrix-org.github.io/matrix-hookshot/latest/setup.html) and the comments in [main.yml](../roles/custom/matrix-bridge-hookshot/defaults/main.yml) to learn what the individual options do.
 

From 5c39ef8ca225701eaa9563dbd6b8fd6f25b7f7c5 Mon Sep 17 00:00:00 2001
From: Suguru Hirahara <acioustick@noreply.codeberg.org>
Date: Sat, 25 Jan 2025 18:02:18 +0900
Subject: [PATCH 2/5] Update docs/configuring-playbook-bridge-hookshot.md: add
 the common section "Troubleshooting"

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
---
 docs/configuring-playbook-bridge-hookshot.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/docs/configuring-playbook-bridge-hookshot.md b/docs/configuring-playbook-bridge-hookshot.md
index 2cb197156..948704ecc 100644
--- a/docs/configuring-playbook-bridge-hookshot.md
+++ b/docs/configuring-playbook-bridge-hookshot.md
@@ -143,3 +143,16 @@ Whichever one you go with, by default metrics are exposed publicly **without** p
 ### Collision with matrix-appservice-webhooks
 
 If you are also running [matrix-appservice-webhooks](configuring-playbook-bridge-appservice-webhooks.md), it reserves its namespace by the default setting `matrix_appservice_webhooks_user_prefix: '_webhook_'`. You should take care if you modify its or hookshot's prefix that they do not collide with each other's namespace (default `matrix_hookshot_generic_userIdPrefix: '_webhooks_'`).
+
+## Troubleshooting
+
+As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-bridge-hookshot`.
+
+### Increase logging verbosity
+
+The default logging level for this component is `warn`. If you want to increase the verbosity, add the following configuration to your `vars.yml` file and re-run the playbook:
+
+```yaml
+# Valid values: debug, info, warn, error
+matrix_hookshot_logging_level: debug
+```

From e8213768a5661b20c322c881db712f0ac6c99b71 Mon Sep 17 00:00:00 2001
From: Suguru Hirahara <acioustick@noreply.codeberg.org>
Date: Sat, 25 Jan 2025 18:04:42 +0900
Subject: [PATCH 3/5] Update files for matrix-bridge-hookshot: sort logging
 levels

Based on docs/configuring-playbook-alertmanager-receiver.md

We can re-sort the levels it if is found out that debug should be placed at the first.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
---
 docs/configuring-playbook-bridge-hookshot.md          | 2 +-
 roles/custom/matrix-bridge-hookshot/defaults/main.yml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/configuring-playbook-bridge-hookshot.md b/docs/configuring-playbook-bridge-hookshot.md
index 948704ecc..6f6bda8e8 100644
--- a/docs/configuring-playbook-bridge-hookshot.md
+++ b/docs/configuring-playbook-bridge-hookshot.md
@@ -153,6 +153,6 @@ As with all other services, you can find the logs in [systemd-journald](https://
 The default logging level for this component is `warn`. If you want to increase the verbosity, add the following configuration to your `vars.yml` file and re-run the playbook:
 
 ```yaml
-# Valid values: debug, info, warn, error
+# Valid values: error, warn, info, debug
 matrix_hookshot_logging_level: debug
 ```
diff --git a/roles/custom/matrix-bridge-hookshot/defaults/main.yml b/roles/custom/matrix-bridge-hookshot/defaults/main.yml
index 82ceabe24..835ef6c38 100644
--- a/roles/custom/matrix-bridge-hookshot/defaults/main.yml
+++ b/roles/custom/matrix-bridge-hookshot/defaults/main.yml
@@ -183,7 +183,7 @@ matrix_hookshot_provisioning_internal: "/v1"
 matrix_hookshot_provisioning_hostname: "{{ matrix_hookshot_public_hostname }}"
 matrix_hookshot_provisioning_endpoint: "{{ matrix_hookshot_public_endpoint }}{{ matrix_hookshot_provisioning_internal }}"
 
-# Valid logging levels are: debug, info, warn, error
+# Valid values: error, warn, info, debug
 matrix_hookshot_logging_level: warn
 
 matrix_hookshot_widgets_enabled: true

From acf2b9034629ed689cad155a340be14ef65b56e5 Mon Sep 17 00:00:00 2001
From: Suguru Hirahara <acioustick@noreply.codeberg.org>
Date: Sat, 25 Jan 2025 17:54:00 +0900
Subject: [PATCH 4/5] Update files for matrix-bridge-hookshot: change the file
 path of config.yml.j2 in order to improve consistency

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
---
 docs/configuring-playbook-bridge-hookshot.md                    | 2 +-
 roles/custom/matrix-bridge-hookshot/defaults/main.yml           | 2 +-
 .../templates/{config.yml.j2 => config.yaml.j2}                 | 0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename roles/custom/matrix-bridge-hookshot/templates/{config.yml.j2 => config.yaml.j2} (100%)

diff --git a/docs/configuring-playbook-bridge-hookshot.md b/docs/configuring-playbook-bridge-hookshot.md
index 6f6bda8e8..ec5f72700 100644
--- a/docs/configuring-playbook-bridge-hookshot.md
+++ b/docs/configuring-playbook-bridge-hookshot.md
@@ -43,7 +43,7 @@ There are some additional things you may wish to configure about the bridge.
 Take a look at:
 
 - `roles/custom/matrix-bridge-hookshot/defaults/main.yml` for some variables that you can customize via your `vars.yml` file
-- `roles/custom/matrix-bridge-hookshot/templates/config.yml.j2` for the bridge's default configuration. You can override settings (even those that don't have dedicated playbook variables) using the `matrix_hookshot_configuration_extension_yaml` and `matrix_hookshot_registration_extension_yaml` variables
+- `roles/custom/matrix-bridge-hookshot/templates/config.yaml.j2` for the bridge's default configuration. You can override settings (even those that don't have dedicated playbook variables) using the `matrix_hookshot_configuration_extension_yaml` and `matrix_hookshot_registration_extension_yaml` variables
 
 Refer the [official instructions](https://matrix-org.github.io/matrix-hookshot/latest/setup.html) and the comments in [main.yml](../roles/custom/matrix-bridge-hookshot/defaults/main.yml) to learn what the individual options do.
 
diff --git a/roles/custom/matrix-bridge-hookshot/defaults/main.yml b/roles/custom/matrix-bridge-hookshot/defaults/main.yml
index 835ef6c38..4de899ca9 100644
--- a/roles/custom/matrix-bridge-hookshot/defaults/main.yml
+++ b/roles/custom/matrix-bridge-hookshot/defaults/main.yml
@@ -330,7 +330,7 @@ matrix_hookshot_homeserver_token: ''
 #
 # For a more advanced customization, you can extend the default (see `matrixhookshot_configuration_extension_yaml`)
 # or completely replace this variable with your own template.
-matrix_hookshot_configuration_yaml: "{{ lookup('template', 'templates/config.yml.j2') }}"
+matrix_hookshot_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
 
 matrix_hookshot_configuration_extension_yaml: |
   # Your custom YAML configuration goes here.
diff --git a/roles/custom/matrix-bridge-hookshot/templates/config.yml.j2 b/roles/custom/matrix-bridge-hookshot/templates/config.yaml.j2
similarity index 100%
rename from roles/custom/matrix-bridge-hookshot/templates/config.yml.j2
rename to roles/custom/matrix-bridge-hookshot/templates/config.yaml.j2

From 5c80c820bc62f40c44bd052f7e00efecbdcf0fa9 Mon Sep 17 00:00:00 2001
From: Suguru Hirahara <acioustick@noreply.codeberg.org>
Date: Sat, 25 Jan 2025 18:24:40 +0900
Subject: [PATCH 5/5] Update docs/configuring-playbook-bridge-hookshot.md: add
 a period

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
---
 docs/configuring-playbook-bridge-hookshot.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/configuring-playbook-bridge-hookshot.md b/docs/configuring-playbook-bridge-hookshot.md
index ec5f72700..13c6eb6f3 100644
--- a/docs/configuring-playbook-bridge-hookshot.md
+++ b/docs/configuring-playbook-bridge-hookshot.md
@@ -98,7 +98,7 @@ Unless indicated otherwise, the following endpoints are reachable on your `matri
 | widgets | `/hookshot/widgetapi/` | `matrix_hookshot_widgets_endpoint` | Widgets |
 | metrics | `/metrics/hookshot` | `matrix_hookshot_metrics_enabled` and exposure enabled via `matrix_hookshot_metrics_proxying_enabled` or `matrix_metrics_exposure_enabled`. Read more in the [Metrics section](#metrics) below. | Prometheus |
 
-Also see the various `matrix_hookshot_container_labels_*` variables in [main.yml](../roles/custom/matrix-bridge-hookshot/defaults/main.yml), which expose URLs publicly
+Also see the various `matrix_hookshot_container_labels_*` variables in [main.yml](../roles/custom/matrix-bridge-hookshot/defaults/main.yml), which expose URLs publicly.
 
 The different listeners are also reachable *internally* in the docker-network via the container's name (configured by `matrix_hookshot_container_url`) and on different ports (e.g. `matrix_hookshot_appservice_port`). Read [main.yml](../roles/custom/matrix-bridge-hookshot/defaults/main.yml) in detail for more info.