Skip to content

Commit

Permalink
Adjust blank lines: remove duplicated ones
Browse files Browse the repository at this point in the history
Signed-off-by: Suguru Hirahara <[email protected]>
  • Loading branch information
Suguru Hirahara committed Dec 1, 2024
1 parent bc1849d commit dd5881f
Show file tree
Hide file tree
Showing 70 changed files with 0 additions and 195 deletions.
1 change: 0 additions & 1 deletion docs/alternative-architectures.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ The playbook automatically determines the target server's architecture (the `mat

Some tools and container images can be built on the host or other measures can be used to install on that architecture.


## Implementation details

For `amd64`, prebuilt container images (see the [container images we use](container-images.md)) are used for all components (except [Hydrogen](configuring-playbook-client-hydrogen.md), which goes through self-building).
Expand Down
8 changes: 0 additions & 8 deletions docs/ansible.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ This playbook is meant to be run using [Ansible](https://www.ansible.com/).

Ansible typically runs on your local computer and carries out tasks on a remote server. If your local computer cannot run Ansible, you can also run Ansible on some server somewhere (including the server you wish to install to).


## Supported Ansible versions

To manually check which version of Ansible you're on, run: `ansible --version`.
Expand All @@ -16,7 +15,6 @@ We're not sure what's the minimum version of Ansible that can run this playbook

If your distro ships with an Ansible version older than this, you may run into issues. Consider [Upgrading Ansible](#upgrading-ansible) or [using Ansible via Docker](#using-ansible-via-docker).


## Upgrading Ansible

Depending on your distribution, you may be able to upgrade Ansible in a few different ways:
Expand All @@ -27,10 +25,8 @@ Depending on your distribution, you may be able to upgrade Ansible in a few diff

If using the `pip` method, do note that the `ansible-playbook` binary may not be on the `$PATH` (https://linuxconfig.org/linux-path-environment-variable), but in some more special location like `/usr/local/bin/ansible-playbook`. You may need to invoke it using the full path.


**Note**: Both of the above methods are a bad way to run system software such as Ansible. If you find yourself needing to resort to such hacks, please consider reporting a bug to your distribution and/or switching to a sane distribution, which provides up-to-date software.


## Using Ansible via Docker

Alternatively, you can run Ansible inside a Docker container (powered by the [devture/ansible](https://hub.docker.com/r/devture/ansible/) Docker image).
Expand All @@ -39,7 +35,6 @@ This ensures that you're using a very recent Ansible version, which is less like

You can either [run Ansible in a container on the Matrix server itself](#running-ansible-in-a-container-on-the-matrix-server-itself) or [run Ansible in a container on another computer (not the Matrix server)](#running-ansible-in-a-container-on-another-computer-not-the-matrix-server).


### Running Ansible in a container on the Matrix server itself

To run Ansible in a (Docker) container on the Matrix server itself, you need to have a working Docker installation. Docker is normally installed by the playbook, so this may be a bit of a chicken and egg problem. To solve it:
Expand Down Expand Up @@ -71,7 +66,6 @@ First, consider running `git config --global --add safe.directory /work` to [res

Finally, you can execute `ansible-playbook ...` (or `ansible-playbook --connection=community.docker.nsenter ...`) commands as per normal now.


### Running Ansible in a container on another computer (not the Matrix server)

Run this from the playbook's directory:
Expand All @@ -93,7 +87,6 @@ First, consider running `git config --global --add safe.directory /work` to [res

Finally, you execute `ansible-playbook ...` commands as per normal now.


#### If you don't use SSH keys for authentication

If you don't use SSH keys for authentication, simply remove that whole line (`-v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa:ro`).
Expand All @@ -104,7 +97,6 @@ apk add sshpass
```
Then, to be asked for the password whenever running an `ansible-playbook` command add `--ask-pass` to the arguments of the command.


#### Resolve directory ownership issues

Because you're `root` in the container running Ansible and this likely differs fom the owner (your regular user account) of the playbook directory outside of the container, certain playbook features which use `git` locally may report warnings such as:
Expand Down
1 change: 0 additions & 1 deletion docs/configuring-playbook-alertmanager-receiver.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ Steps 1 and 2 above only need to be done once, while preparing your [configurati

Steps 3 and 4 need to be done for each new room you'd like the bot to deliver alerts to. Step 5 is optional and provides cleaner `/alert/` URLs.


## Installing

Now that you've [prepared the bot account and room](#account-and-room-preparation), [configured the playbook](#adjusting-the-playbook-configuration), and potentially [adjusted your DNS records](#adjusting-dns-records), you can run the playbook with [playbook tags](playbook-tags.md) as below:
Expand Down
2 changes: 0 additions & 2 deletions docs/configuring-playbook-appservice-draupnir-for-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ The playbook can install and configure the [Draupnir](https://github.com/the-dra

Appservice mode can be used together with the regular [Draupnir bot](configuring-playbook-bot-draupnir.md) or independently. Details about the differences between the 2 modes are described below.


## Draupnir Appservice mode compared to Draupnir bot mode

The administrative functions for managing the appservice are alpha quality and very limited. However, the experience of using an appservice-provisioned Draupnir is on par with the experience of using Draupnir from bot mode except in the case of avatar customisation as described later on in this document.
Expand All @@ -17,7 +16,6 @@ Normal Draupnir does come with the benefit of access to Synapse Admin features.

Draupnir for all does not support external tooling like [MRU](https://mru.rory.gay) as it can't access Draupnir's user account.


## Installation

### 1. Create a main management room.
Expand Down
2 changes: 0 additions & 2 deletions docs/configuring-playbook-base-domain-serving.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Doing this, the playbook will:

- serve a simple homepage at `https://example.com` with content `Hello from example.com` (configurable via the `matrix_static_files_file_index_html_template` variable). You can also [serve a more complicated static website](#serving-a-static-website-at-the-base-domain).


## Serving a static website at the base domain

By default, when "serving the base domain" is enabled, the playbook hosts a simple `index.html` webpage at `/matrix/static-files/public/index.html`. The content of this page is taken from the `matrix_static_files_file_index_html_template` variable.
Expand All @@ -56,7 +55,6 @@ With this configuration, Ansible will no longer mess around with the `/matrix/st

You are then free to upload any static website files to `/matrix/static-files/public` and they will get served at the base domain. You can do so manually or by using the [ansible-role-aux](https://github.com/mother-of-all-self-hosting/ansible-role-aux) Ansible role, which is part of this playbook already.


## Serving a more complicated website at the base domain

If you'd like to serve an even more complicated (dynamic) website from the Matrix server, relying on the playbook to serve the base domain is not the best choice.
Expand Down
13 changes: 0 additions & 13 deletions docs/configuring-playbook-bot-baibot.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ It supports [OpenAI](https://openai.com/)'s [ChatGPT](https://openai.com/blog/ch

It's designed as a more private and [✨ featureful](https://github.com/etkecc/baibot/?tab=readme-ov-file#-features) alternative to [matrix-chatgpt-bot](./configuring-playbook-bot-chatgpt.md). See the [baibot](https://github.com/etkecc/baibot) project and its documentation for more information.


## Prerequisites

API access to one or more LLM [☁️ providers](https://github.com/etkecc/baibot/blob/main/docs/providers.md).


## Adjusting the playbook configuration

There are **a lot of configuration options** (some required, some possibly required, some optional), so they're **split into multiple sections below**:
Expand All @@ -30,7 +28,6 @@ There are **a lot of configuration options** (some required, some possibly requi

Depending on your current `vars.yml` file and desired configuration, **you may require more than just the [base configuration](#base-configuration)**.


### Base configuration

Add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
Expand Down Expand Up @@ -73,7 +70,6 @@ matrix_bot_baibot_config_persistence_config_encryption_key: 'A_HEX_STRING_OF_64_
As mentioned above, **this may not be enough**. Continue with the configuration sections below.
### 👮‍♂️ Administrator configuration
This is an addition to the [base configuration](#base-configuration).
Expand Down Expand Up @@ -139,7 +135,6 @@ Depending on your propensity for [GitOps](https://en.wikipedia.org/wiki/DevOps#G

Before proceeding, we recommend reading the upstream documentation on [How to choose a provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#how-to-choose-a-provider). In short, it's probably best to go with [OpenAI](#openai).


#### Anthropic

You can statically-define a single [🤖 agent](https://github.com/etkecc/baibot/blob/main/docs/agents.md) instance powered by the [Anthropic provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#anthropic) with the help of the playbook's preset variables.
Expand All @@ -166,7 +161,6 @@ If you'd like to use more than one model, take a look at the [Configuring additi

💡 You may also wish to use this new agent for [🤝 Configuring initial default handlers](#-configuring-initial-default-handlers).


#### Groq

You can statically-define a single [🤖 agent](https://github.com/etkecc/baibot/blob/main/docs/agents.md) instance powered by the [Groq provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#groq) with the help of the playbook's preset variables.
Expand Down Expand Up @@ -200,7 +194,6 @@ If you'd like to use more than one model, take a look at the [Configuring additi

💡 You may also wish to use this new agent for [🤝 Configuring initial default handlers](#-configuring-initial-default-handlers).


#### Mistral

You can statically-define a single [🤖 agent](https://github.com/etkecc/baibot/blob/main/docs/agents.md) instance powered by the [🇫🇷 Mistral provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#mistral) with the help of the playbook's preset variables.
Expand Down Expand Up @@ -229,7 +222,6 @@ If you'd like to use more than one model, take a look at the [Configuring additi

💡 You may also wish to use this new agent for [🤝 Configuring initial default handlers](#-configuring-initial-default-handlers).


#### OpenAI

You can statically-define a single [🤖 agent](https://github.com/etkecc/baibot/blob/main/docs/agents.md) instance powered by the [OpenAI provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#openai) with the help of the playbook's preset variables.
Expand Down Expand Up @@ -260,7 +252,6 @@ If you'd like to use more than one model, take a look at the [Configuring additi

💡 You may also wish to use this new agent for [🤝 Configuring initial default handlers](#-configuring-initial-default-handlers).


#### OpenAI Compatible

You can statically-define a single [🤖 agent](https://github.com/etkecc/baibot/blob/main/docs/agents.md) instance powered by the [OpenAI Compatible provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md#openai-compatible) with the help of the playbook's preset variables.
Expand All @@ -271,7 +262,6 @@ Some of these popular services already have **shortcut** providers (see [support

As of this moment, the playbook does not include presets for any of these services, so you'll need to [Configuring additional agents (without a preset)](#configuring-additional-agents-without-a-preset).


#### Configuring additional agents (without a preset)

The Ansible role may be lacking preset variables for some [☁️ provider](https://github.com/etkecc/baibot/blob/main/docs/providers.md), or you may wish to statically-define an agent on the same provider twice (or more) with different configuration.
Expand Down Expand Up @@ -327,7 +317,6 @@ As with any [🤖 agent](https://github.com/etkecc/baibot/blob/main/docs/agents.

💡 You may also wish to use these new agents for [🤝 Configuring initial default handlers](#-configuring-initial-default-handlers).


### 🤝 Configuring initial default handlers

This section is only useful if you're [🤖 Configuring agents via Ansible](#-configuring-agents-via-ansible), as it lets you put these agents to use as soon as the bot starts (by adjusting the bot's **initial global configuration**).
Expand Down Expand Up @@ -373,7 +362,6 @@ matrix_bot_baibot_config_initial_global_config_handler_image_generation: null

**Note**: these are initial defaults for the bot's global configuration. As such, changing any of these values subsequently has no effect on the bot's behavior. **Once initially configured the global configuration cannot be managed Ansible**, but only via bot commands.


## Installing

After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below:
Expand Down Expand Up @@ -407,7 +395,6 @@ Send `!bai help` to the room at any time to see the bot's help menu for addition

You can also refer to the upstream [baibot](https://github.com/etkecc/baibot) project's documentation.


## Debugging

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`
Expand Down
3 changes: 0 additions & 3 deletions docs/configuring-playbook-bot-chatgpt.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ You can use the playbook to [register a new user](registering-users.md):
ansible-playbook -i inventory/hosts setup.yml --extra-vars='username=bot.chatgpt password=PASSWORD_FOR_THE_BOT admin=no' --tags=register-user
```


## 2. Get an access token and create encryption keys

Refer to the documentation on [how to obtain an access token](obtaining-access-tokens.md).

To make sure the bot can read encrypted messages, it will need an encryption key, just like any other new user. While obtaining the access token, follow the prompts to setup a backup key. More information can be found in the [Element documentation](https://element.io/help#encryption6).


## 3. Adjusting the playbook configuration

Add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file (adapt to your needs):
Expand All @@ -53,7 +51,6 @@ matrix_bot_chatgpt_matrix_bot_prompt_prefix: 'Instructions:\nYou are ChatGPT, a
You will need to get tokens for ChatGPT.
## 4. Installing
After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below:
Expand Down
7 changes: 0 additions & 7 deletions docs/configuring-playbook-bot-draupnir.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ See the project's [documentation](https://github.com/the-draupnir-project/Draupn

This documentation page is about installing Draupnir in bot mode. As an alternative, you can run a multi-instance Draupnir deployment by installing [Draupnir in appservice mode](./configuring-playbook-appservice-draupnir-for-all.md) (called Draupnir-for-all) instead.


If your migrating from Mjolnir skip to step 5b.

## 1. Register the bot account
Expand All @@ -25,12 +24,10 @@ ansible-playbook -i inventory/hosts setup.yml --extra-vars='username=bot.draupni

If you would like Draupnir to be able to deactivate users, move aliases, shutdown rooms, show abuse reports ([see below](#abuse-reports)), etc then it must be a server admin so you need to change `admin=no` to `admin=yes` in the command above.


## 2. Get an access token

Refer to the documentation on [how to obtain an access token](obtaining-access-tokens.md).


## 3. Make sure the account is free from rate limiting

You will need to prevent Synapse from rate limiting the bot's account. This is not an optional step. If you do not do this step Draupnir will crash. This can be done using Synapse's [admin API](https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#override-ratelimiting-for-users). Please ask for help if you are uncomfortable with these steps or run into issues.
Expand All @@ -39,8 +36,6 @@ If your Synapse Admin API is exposed to the internet for some reason like runnin

The following command works on semi up to date Windows 10 installs and All Windows 11 installations and other systems that ship curl. `curl --header "Authorization: Bearer <access_token>" -X POST https://matrix.example.com/_synapse/admin/v1/users/@example:example.com/override_ratelimit` Replace `@example:example.com` with the MXID of your Draupnir and example.com with your homeserver domain. You can easily obtain an access token for a homeserver admin account the same way you can obtain an access token for Draupnir itself. If you made Draupnir Admin you can just use the Draupnir token.



## 4. Create a management room

Using your own account, create a new invite only room that you will use to manage the bot. This is the room where you will see the status of the bot and where you will send commands to the bot, such as the command to ban a user from another room. Anyone in this room can control the bot so it is important that you only invite trusted users to this room.
Expand All @@ -51,7 +46,6 @@ Once you have created the room you need to copy the room ID so you can tell the

Finally invite the `@bot.draupnir:example.com` account you created earlier into the room.


## 5. Adjusting the playbook configuration

Decide whether you want Draupnir to be capable of operating in end-to-end encrypted (E2EE) rooms. This includes the management room and the moderated rooms. To support E2EE, Draupnir needs to [use Pantalaimon](configuring-playbook-pantalaimon.md).
Expand Down Expand Up @@ -200,7 +194,6 @@ To **enable a given protection**, send a command like this: `!draupnir enable PR

To **disable a given protection**, send a command like this: `!draupnir disable PROTECTION_NAME` (e.g. `!draupnir disable JoinWaveShortCircuit`).


## Extending the configuration

You can configure additional options by adding the `matrix_bot_draupnir_configuration_extension_yaml` variable to your `inventory/host_vars/matrix.example.com/vars.yml` file.
Expand Down
2 changes: 0 additions & 2 deletions docs/configuring-playbook-bot-go-neb.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Go-NEB is a Matrix bot written in Go. It is the successor to Matrix-NEB, the ori

See the project's [documentation](https://github.com/matrix-org/go-neb) to learn what it does and why it might be useful to you.


## Registering the bot user

The playbook does not automatically create users for you. The bot requires at least 1 access token to be able to connect to your homeserver.
Expand All @@ -25,7 +24,6 @@ ansible-playbook -i inventory/hosts setup.yml --extra-vars='username=bot.go-neb

Once the user is created you can [obtain an access token](obtaining-access-tokens.md).


## Adjusting the playbook configuration

To enable Go-NEB, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
Expand Down
1 change: 0 additions & 1 deletion docs/configuring-playbook-bot-honoroit.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ It's a bot you can use to setup **your own helpdesk on matrix**

See the project's [documentation](https://github.com/etkecc/honoroit#how-it-looks-like) to learn what it does with screenshots and why it might be useful to you.


## Adjusting the playbook configuration

To enable Honoroit, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
Expand Down
1 change: 0 additions & 1 deletion docs/configuring-playbook-bot-matrix-registration-bot.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ The bot allows you to easily **create and manage registration tokens** aka. invi

See the project's [documentation](https://github.com/moan0s/matrix-registration-bot#supported-commands) to learn what it does and why it might be useful to you.


## Configuration

To enable the bot, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
Expand Down
2 changes: 0 additions & 2 deletions docs/configuring-playbook-bot-matrix-reminder-bot.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ It's a bot you can use to **schedule one-off & recurring reminders and alarms**.

See the project's [documentation](https://github.com/anoadragon453/matrix-reminder-bot#usage) to learn what it does and why it might be useful to you.


## Adjusting the playbook configuration

Add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:
Expand All @@ -24,7 +23,6 @@ matrix_bot_matrix_reminder_bot_matrix_user_password: PASSWORD_FOR_THE_BOT
matrix_bot_matrix_reminder_bot_reminders_timezone: Europe/London
```
## Installing
After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below:
Expand Down
Loading

0 comments on commit dd5881f

Please sign in to comment.