diff --git a/docs/configuring-playbook-bot-baibot.md b/docs/configuring-playbook-bot-baibot.md index ac270d3a3..a9c3d2c66 100644 --- a/docs/configuring-playbook-bot-baibot.md +++ b/docs/configuring-playbook-bot-baibot.md @@ -398,7 +398,7 @@ You can also refer to the upstream [baibot](https://github.com/etkecc/baibot) pr ## Troubleshooting -As with all other services, you can find service logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by running something like `journalctl -fu matrix-bot-baibot` +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-bot-baibot`. ### Increase logging verbosity diff --git a/docs/configuring-playbook-bot-matrix-registration-bot.md b/docs/configuring-playbook-bot-matrix-registration-bot.md index 95b86163f..fffd239f2 100644 --- a/docs/configuring-playbook-bot-matrix-registration-bot.md +++ b/docs/configuring-playbook-bot-matrix-registration-bot.md @@ -29,6 +29,15 @@ matrix_synapse_registration_requires_token: true The bot account will be created automatically. +### Extending the configuration + +There are some additional things you may wish to configure about the bot. + +Take a look at: + +- `roles/custom/matrix-bot-matrix-registration-bot/defaults/main.yml` for some variables that you can customize via your `vars.yml` file +- `roles/custom/matrix-bot-matrix-registration-bot/templates/config.yaml.j2` for the bridge's default configuration + ## Installing After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below: @@ -63,3 +72,16 @@ To clean the cache (session & encryption data) after you changed the bot's usern ```sh just run-tags bot-matrix-registration-bot-clean-cache ``` + +## 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-registration-bot`. + +### Increase logging verbosity + +The default logging level for this component is `INFO`. If you want to increase the verbosity, add the following configuration to your `vars.yml` file and re-run the playbook: + +```yaml +# Valid values: ERROR, INFO, DEBUG +matrix_bot_matrix_registration_bot_logging_level: DEBUG +``` diff --git a/docs/configuring-playbook-rageshake.md b/docs/configuring-playbook-rageshake.md index 6db32e43a..e52c8cdef 100644 --- a/docs/configuring-playbook-rageshake.md +++ b/docs/configuring-playbook-rageshake.md @@ -20,18 +20,6 @@ To enable rageshake, add the following configuration to your `inventory/host_var matrix_rageshake_enabled: true ``` -rageshake has various options which don't have dedicated Ansible variables. You can see the full list of options in the [`rageshake.sample.yaml` file](https://github.com/matrix-org/rageshake/blob/master/rageshake.sample.yaml). - -To set these, you can make use of the `matrix_rageshake_configuration_extension_yaml` variable like this: - -```yaml -matrix_rageshake_configuration_extension_yaml: | - github_token: secrettoken - - github_project_mappings: - my-app: octocat/HelloWorld -``` - ### Adjusting the rageshake URL (optional) By tweaking the `matrix_rageshake_hostname` and `matrix_rageshake_path_prefix` variables, you can easily make the service available at a **different hostname and/or path** than the default one. @@ -51,6 +39,31 @@ After changing the domain, **you may need to adjust your DNS** records to point If you've decided to reuse the `matrix.` domain, you won't need to do any extra DNS configuration. +### Extending the configuration + +There are some additional things you may wish to configure about the server. + +Take a look at: + +- `roles/custom/matrix-rageshake/defaults/main.yml` for some variables that you can customize via your `vars.yml` file +- `roles/custom/matrix-rageshake/templates/config.yaml.j2` for the server's default configuration. You can override settings (even those that don't have dedicated playbook variables) using the `matrix_rageshake_configuration_extension_yaml` variable + +```yaml +matrix_rageshake_configuration_extension_yaml: | + # Your custom YAML configuration goes here. + # This configuration extends the default starting configuration (`matrix_rageshake_configuration_extension_yaml`). + # + # You can override individual variables from the default configuration, or introduce new ones. + # + # If you need something more special, you can take full control by + # completely redefining `matrix_rageshake_configuration_extension_yaml`. + + github_token: secrettoken + + github_project_mappings: + my-app: octocat/HelloWorld +``` + ## Installing After configuring the playbook and potentially [adjusting your DNS records](#adjusting-dns-records), run the playbook with [playbook tags](playbook-tags.md) as below: @@ -67,3 +80,7 @@ The shortcut commands with the [`just` program](just.md) are also available: `ju ## Usage Refer to the project's [documentation](https://github.com/matrix-org/rageshake/blob/main/README.md) for available APIs, etc. + +## 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-rageshake`. diff --git a/roles/custom/matrix-bot-baibot/defaults/main.yml b/roles/custom/matrix-bot-baibot/defaults/main.yml index fba1cd908..d3737b2a8 100644 --- a/roles/custom/matrix-bot-baibot/defaults/main.yml +++ b/roles/custom/matrix-bot-baibot/defaults/main.yml @@ -461,7 +461,7 @@ matrix_bot_baibot_configuration: "{{ matrix_bot_baibot_configuration_yaml | from # # For a more advanced customization, you can extend the default (see `matrix_bot_baibot_configuration_extension_yaml`) # or completely replace this variable with your own template. -matrix_bot_baibot_configuration_yaml: "{{ lookup('template', 'templates/config.yml.j2') }}" +matrix_bot_baibot_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}" matrix_bot_baibot_configuration_extension_yaml: | # Your custom YAML configuration for baibot goes here. diff --git a/roles/custom/matrix-bot-baibot/tasks/install.yml b/roles/custom/matrix-bot-baibot/tasks/install.yml index f74ab3442..d2dcfdb6d 100644 --- a/roles/custom/matrix-bot-baibot/tasks/install.yml +++ b/roles/custom/matrix-bot-baibot/tasks/install.yml @@ -17,7 +17,7 @@ - name: Ensure baibot configuration installed ansible.builtin.copy: content: "{{ matrix_bot_baibot_configuration | to_nice_yaml(indent=2, width=999999) }}" - dest: "{{ matrix_bot_baibot_config_path }}/config.yml" + dest: "{{ matrix_bot_baibot_config_path }}/config.yaml" mode: 0644 owner: "{{ matrix_user_username }}" group: "{{ matrix_user_groupname }}" diff --git a/roles/custom/matrix-bot-baibot/templates/config.yml.j2 b/roles/custom/matrix-bot-baibot/templates/config.yaml.j2 similarity index 100% rename from roles/custom/matrix-bot-baibot/templates/config.yml.j2 rename to roles/custom/matrix-bot-baibot/templates/config.yaml.j2 diff --git a/roles/custom/matrix-bot-baibot/templates/systemd/matrix-bot-baibot.service.j2 b/roles/custom/matrix-bot-baibot/templates/systemd/matrix-bot-baibot.service.j2 index 346925c4a..e34f62357 100644 --- a/roles/custom/matrix-bot-baibot/templates/systemd/matrix-bot-baibot.service.j2 +++ b/roles/custom/matrix-bot-baibot/templates/systemd/matrix-bot-baibot.service.j2 @@ -29,7 +29,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ --read-only \ --network={{ matrix_bot_baibot_container_network }} \ --env-file={{ matrix_bot_baibot_config_path }}/env \ - --mount type=bind,src={{ matrix_bot_baibot_config_path }}/config.yml,dst=/app/config.yml,ro \ + --mount type=bind,src={{ matrix_bot_baibot_config_path }}/config.yaml,dst=/app/config.yaml,ro \ --mount type=bind,src={{ matrix_bot_baibot_data_path }},dst=/data \ --tmpfs=/tmp:rw,noexec,nosuid,size=1024m \ {% for arg in matrix_bot_baibot_container_extra_arguments %} diff --git a/roles/custom/matrix-bot-matrix-registration-bot/defaults/main.yml b/roles/custom/matrix-bot-matrix-registration-bot/defaults/main.yml index ba1fc7273..9423e8fad 100644 --- a/roles/custom/matrix-bot-matrix-registration-bot/defaults/main.yml +++ b/roles/custom/matrix-bot-matrix-registration-bot/defaults/main.yml @@ -39,7 +39,8 @@ matrix_bot_matrix_registration_bot_api_token: '' matrix_bot_matrix_registration_bot_device_id: "matrix-docker-ansible-deploy" -matrix_bot_matrix_registration_bot_logging_level: info +# Valid values: ERROR, INFO, DEBUG +matrix_bot_matrix_registration_bot_logging_level: INFO matrix_bot_matrix_registration_bot_container_network: "" diff --git a/roles/custom/matrix-bot-matrix-registration-bot/tasks/setup_install.yml b/roles/custom/matrix-bot-matrix-registration-bot/tasks/setup_install.yml index 0ac4e6a1f..a05c04109 100644 --- a/roles/custom/matrix-bot-matrix-registration-bot/tasks/setup_install.yml +++ b/roles/custom/matrix-bot-matrix-registration-bot/tasks/setup_install.yml @@ -15,8 +15,8 @@ - name: Ensure matrix-registration-bot configuration file created ansible.builtin.template: - src: "{{ role_path }}/templates/config.yml.j2" - dest: "{{ matrix_bot_matrix_registration_bot_config_path }}/config.yml" + src: "{{ role_path }}/templates/config.yaml.j2" + dest: "{{ matrix_bot_matrix_registration_bot_config_path }}/config.yaml" owner: "{{ matrix_user_username }}" group: "{{ matrix_user_groupname }}" mode: 0640 diff --git a/roles/custom/matrix-bot-matrix-registration-bot/templates/config.yml.j2 b/roles/custom/matrix-bot-matrix-registration-bot/templates/config.yaml.j2 similarity index 100% rename from roles/custom/matrix-bot-matrix-registration-bot/templates/config.yml.j2 rename to roles/custom/matrix-bot-matrix-registration-bot/templates/config.yaml.j2 diff --git a/roles/custom/matrix-bot-matrix-registration-bot/templates/systemd/matrix-bot-matrix-registration-bot.service.j2 b/roles/custom/matrix-bot-matrix-registration-bot/templates/systemd/matrix-bot-matrix-registration-bot.service.j2 index a48c4f045..d12d2f588 100644 --- a/roles/custom/matrix-bot-matrix-registration-bot/templates/systemd/matrix-bot-matrix-registration-bot.service.j2 +++ b/roles/custom/matrix-bot-matrix-registration-bot/templates/systemd/matrix-bot-matrix-registration-bot.service.j2 @@ -21,7 +21,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ --name=matrix-bot-matrix-registration-bot \ --log-driver=none \ --cap-drop=ALL \ - -e "CONFIG_PATH=/config/config.yml" \ + -e "CONFIG_PATH=/config/config.yaml" \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --read-only \ --mount type=bind,src={{ matrix_bot_matrix_registration_bot_config_path }},dst=/config,ro \ diff --git a/roles/custom/matrix-rageshake/defaults/main.yml b/roles/custom/matrix-rageshake/defaults/main.yml index 77caeab1b..f104cbebd 100644 --- a/roles/custom/matrix-rageshake/defaults/main.yml +++ b/roles/custom/matrix-rageshake/defaults/main.yml @@ -93,7 +93,7 @@ matrix_rageshake_config_api_prefix: "{{ matrix_rageshake_scheme }}://{{ matrix_r # # For a more advanced customization, you can extend the default (see `matrix_rageshake_configuration_extension_yaml`) # or completely replace this variable with your own template. -matrix_rageshake_configuration_yaml: "{{ lookup('template', 'templates/config.yml.j2') }}" +matrix_rageshake_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}" matrix_rageshake_configuration_extension_yaml: | # Your custom YAML configuration for Synapse goes here. diff --git a/roles/custom/matrix-rageshake/tasks/install.yml b/roles/custom/matrix-rageshake/tasks/install.yml index 572f03f1f..33953de5e 100644 --- a/roles/custom/matrix-rageshake/tasks/install.yml +++ b/roles/custom/matrix-rageshake/tasks/install.yml @@ -19,7 +19,7 @@ - name: Ensure rageshake config file created ansible.builtin.copy: content: "{{ matrix_rageshake_configuration | to_nice_yaml(indent=2, width=999999) }}" - dest: "{{ matrix_rageshake_config_path }}/config.yml" + dest: "{{ matrix_rageshake_config_path }}/config.yaml" owner: "{{ matrix_user_username }}" group: "{{ matrix_user_groupname }}" mode: 0640 diff --git a/roles/custom/matrix-rageshake/templates/config.yml.j2 b/roles/custom/matrix-rageshake/templates/config.yaml.j2 similarity index 100% rename from roles/custom/matrix-rageshake/templates/config.yml.j2 rename to roles/custom/matrix-rageshake/templates/config.yaml.j2 diff --git a/roles/custom/matrix-rageshake/templates/systemd/matrix-rageshake.service.j2 b/roles/custom/matrix-rageshake/templates/systemd/matrix-rageshake.service.j2 index 9abaf3db5..ba98d0e3a 100644 --- a/roles/custom/matrix-rageshake/templates/systemd/matrix-rageshake.service.j2 +++ b/roles/custom/matrix-rageshake/templates/systemd/matrix-rageshake.service.j2 @@ -32,7 +32,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ {{ arg }} \ {% endfor %} {{ matrix_rageshake_container_image }} \ - --config /config/config.yml + --config /config/config.yaml {% for network in matrix_rageshake_container_additional_networks %} ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network connect {{ network }} matrix-rageshake