commit
4c60b1dabf
@ -1,26 +1,18 @@
|
|||||||
# Alternative architectures
|
# Alternative architectures
|
||||||
|
|
||||||
As stated in the [Prerequisites](prerequisites.md), currently only `x86_64` is fully supported. However, it is possible to set the target architecture, and some tools can be built on the host or other measures can be used.
|
As stated in the [Prerequisites](prerequisites.md), currently only `amd64` (`x86_64`) is fully supported.
|
||||||
|
|
||||||
To that end add the following variable to your `vars.yml` file (see [Configuring playbook](configuring-playbook.md)):
|
The playbook automatically determines the target server's architecture (the `matrix_architecture` variable) to be one of the following:
|
||||||
|
|
||||||
```yaml
|
- `amd64` (`x86_64`)
|
||||||
matrix_architecture: <your-matrix-server-architecture>
|
|
||||||
```
|
|
||||||
|
|
||||||
Currently supported architectures are the following:
|
|
||||||
- `amd64` (the default)
|
|
||||||
- `arm64`
|
|
||||||
- `arm32`
|
- `arm32`
|
||||||
|
- `arm64`
|
||||||
|
|
||||||
so for the Raspberry Pi, the following should be in your `vars.yml` file:
|
Some tools and container images can be built on the host or other measures can be used to install on that architecture.
|
||||||
|
|
||||||
```yaml
|
|
||||||
matrix_architecture: "arm32"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Implementation details
|
## 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).
|
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).
|
||||||
|
|
||||||
For other architectures, components which have a prebuilt image make use of it. If the component is not available for the specific architecture, [self-building](self-building.md) will be used. Not all components support self-building though, so your mileage may vary.
|
For other architecture (`arm64`, `arm32`), components which have a prebuilt image make use of it. If the component is not available for the specific architecture, [self-building](self-building.md) will be used. Not all components support self-building though, so your mileage may vary.
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
# Configuring Dendrite (optional)
|
||||||
|
|
||||||
|
By default, this playbook configures the [Synapse](https://github.com/matrix-org/synapse) Matrix server, but you can also use [Dendrite](https://github.com/matrix-org/dendrite).
|
||||||
|
|
||||||
|
**NOTES**:
|
||||||
|
|
||||||
|
- **You can't switch an existing Matrix server's implementation** (e.g. Synapse -> Dendrite). Proceed below only if you're OK with losing data or you're dealing with a server on a new domain name, which hasn't participated in the Matrix federation yet.
|
||||||
|
|
||||||
|
- **homeserver implementations other than Synapse may not be fully functional**. The playbook may also not assist you in an optimal way (like it does with Synapse). Make yourself familiar with the downsides before proceeding
|
||||||
|
|
||||||
|
The playbook provided settings for Dendrite are defined in [`roles/custom/matrix-dendrite/defaults/main.yml`](../roles/custom/matrix-dendrite/defaults/main.yml) and they ultimately end up in the generated `/matrix/dendrite/config/dendrite.yaml` file (on the server). This file is generated from the [`roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2`](../roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2) template.
|
||||||
|
|
||||||
|
**If there's an existing variable** which controls a setting you wish to change, you can simply define that variable in your configuration file (`inventory/host_vars/matrix.<your-domain>/vars.yml`) and [re-run the playbook](installing.md) to apply the changes.
|
||||||
|
|
||||||
|
Alternatively, **if there is no pre-defined variable** for a Dendrite setting you wish to change:
|
||||||
|
|
||||||
|
- you can either **request a variable to be created** (or you can submit such a contribution yourself). Keep in mind that it's **probably not a good idea** to create variables for each one of Dendrite's various settings that rarely get used.
|
||||||
|
|
||||||
|
- or, you can **extend and override the default configuration** ([`dendrite.yaml.j2`](../roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2)) by making use of the `matrix_dendrite_configuration_extension_yaml` variable. You can find information about this in [`roles/custom/matrix-dendrite/defaults/main.yml`](../roles/custom/matrix-dendrite/defaults/main.yml).
|
||||||
|
|
||||||
|
- or, if extending the configuration is still not powerful enough for your needs, you can **override the configuration completely** using `matrix_dendrite_configuration` (or `matrix_dendrite_configuration_yaml`). You can find information about this in [`roles/custom/matrix-dendrite/defaults/main.yml`](../roles/custom/matrix-dendrite/defaults/main.yml).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
To use Dendrite, you **generally** need the following additional `vars.yml` configuration:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
matrix_homeserver_implementation: dendrite
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,59 @@
|
|||||||
|
# Enabling metrics and graphs for NginX logs (optional)
|
||||||
|
|
||||||
|
It can be useful to have some (visual) insight into NignX logs.
|
||||||
|
|
||||||
|
This adds [prometheus-nginxlog-exporter](https://github.com/martin-helmich/prometheus-nginxlog-exporter/) to your matrix deployment.
|
||||||
|
It will provide a prometheus 'metrics' endpoint exposing data from both the `matrix-nginx-proxy` and `matrix-synapse-reverse-proxy-companion` logs and automatically aggregates the data with prometheus.
|
||||||
|
Optionally it visualizes the data, if [`matrix-grafana`](configuring-playbook-prometheus-grafana.md) is enabled, by means of a dedicated Grafana dashboard named `NGINX PROXY`
|
||||||
|
|
||||||
|
You can enable this role by adding the following settings in your configuration file (`inventory/host_vars/matrix.<your-domain>/vars.yml`):
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
matrix_prometheus_nginxlog_exporter_enabled: true
|
||||||
|
|
||||||
|
# required depency
|
||||||
|
matrix_prometheus_enabled: true
|
||||||
|
|
||||||
|
# optional for visualization
|
||||||
|
matrix_grafana_enabled: true
|
||||||
|
```
|
||||||
|
|
||||||
|
x | Prerequisites | Variable | Description
|
||||||
|
|:--:|:--:|:--:|:--|
|
||||||
|
**REQUIRED** | `matrix-prometheus`| `matrix_prometheus_enabled`|[Prometheus](https://prometheus.io) is a time series database. It holds all the data we're going to talk about.
|
||||||
|
_Optional_ | [`matrix-grafana`](configuring-playbook-prometheus-grafana.md) | [`matrix_grafana_enabled`](configuring-playbook-prometheus-grafana.md)|[Grafana](https://grafana.com) is the visual component. It shows (on the `stats.<your-domain>` subdomain) graphs that we're interested in. When enabled the `NGINX PROXY` dashboard is automatically added.
|
||||||
|
|
||||||
|
## Docker Image Compatibility
|
||||||
|
|
||||||
|
At the moment of writing only images for `amd64` and `arm64` architectures are available
|
||||||
|
|
||||||
|
The playbook currently does not support building an image.
|
||||||
|
You can however use a custom-build image by setting
|
||||||
|
```yaml
|
||||||
|
matrix_prometheus_nginxlog_exporter_docker_image_arch_check_enabled: false
|
||||||
|
matrix_prometheus_nginxlog_exporter_docker_image: path/to/docker/image:tag
|
||||||
|
```
|
||||||
|
|
||||||
|
## Security and privacy
|
||||||
|
|
||||||
|
Metrics and resulting graphs can contain a lot of information. NginX logs contain information like IP address, URLs, UserAgents and more. This information can reveal usage patterns and could be considered Personally Identifiable Information (PII). Think about this before enabling (anonymous) access.
|
||||||
|
Please make sure you change the default Grafana password.
|
||||||
|
|
||||||
|
## Save metrics on an external Prometheus server
|
||||||
|
|
||||||
|
The playbook will automatically integrate the metrics into the Prometheus server provided with this playbook. You can choose to save data on an external Prometheus instance.
|
||||||
|
|
||||||
|
The metrics of this role will be exposed on `https://matrix.DOMAIN/metrics/nginxlog` when setting
|
||||||
|
```yaml
|
||||||
|
matrix_prometheus_nginxlog_exporter_metrics_proxying_enabled: true
|
||||||
|
|
||||||
|
# required dependency
|
||||||
|
matrix_nginx_proxy_proxy_matrix_metrics_enabled: true
|
||||||
|
```
|
||||||
|
The playbook can provide a single endpoint (`https://matrix.DOMAIN/metrics/*`), under which various services may expose their metrics (e.g. `/metrics/node-exporter`, `/metrics/postgres-exporter`, `/metrics/nginxlog`, etc). To enable this `/metrics/*` feature, use `matrix_nginx_proxy_proxy_matrix_metrics_enabled`. To protect access using [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication), see `matrix_nginx_proxy_proxy_matrix_metrics_basic_auth_enabled`.
|
||||||
|
|
||||||
|
The following variables may be of interest:
|
||||||
|
|
||||||
|
Name | Description
|
||||||
|
-----|----------
|
||||||
|
`matrix_nginx_proxy_proxy_matrix_metrics_enabled`|Set this to `true` to enable metrics exposure for various services on `https://matrix.DOMAIN/metrics/*`. Refer to the individual `matrix_SERVICE_metrics_proxying_enabled` variables below for exposing metrics for each individual service.
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
- name: "Set up additional Jitsi JVB servers"
|
||||||
|
hosts: "jitsi_jvb_servers"
|
||||||
|
become: true
|
||||||
|
|
||||||
|
roles:
|
||||||
|
- role: galaxy/com.devture.ansible.role.playbook_help
|
||||||
|
- role: galaxy/com.devture.ansible.role.systemd_docker_base
|
||||||
|
|
||||||
|
- custom/matrix-base
|
||||||
|
- custom/matrix-jitsi
|
||||||
|
- custom/matrix-common-after
|
@ -0,0 +1,126 @@
|
|||||||
|
---
|
||||||
|
- name: "Set up a Matrix server"
|
||||||
|
hosts: "{{ target if target is defined else 'matrix_servers' }}"
|
||||||
|
become: true
|
||||||
|
|
||||||
|
roles:
|
||||||
|
# Most of the roles below are not distributed with the playbook, but downloaded separately using `ansible-galaxy` via the `make roles` command (see `Makefile`).
|
||||||
|
- role: galaxy/com.devture.ansible.role.playbook_help
|
||||||
|
|
||||||
|
- role: galaxy/com.devture.ansible.role.systemd_docker_base
|
||||||
|
|
||||||
|
- role: custom/matrix_playbook_migration
|
||||||
|
|
||||||
|
- when: matrix_playbook_docker_installation_enabled | bool
|
||||||
|
role: galaxy/geerlingguy.docker
|
||||||
|
vars:
|
||||||
|
docker_install_compose: false
|
||||||
|
tags:
|
||||||
|
- setup-docker
|
||||||
|
- setup-all
|
||||||
|
- install-docker
|
||||||
|
- install-all
|
||||||
|
|
||||||
|
- when: devture_docker_sdk_for_python_installation_enabled | bool
|
||||||
|
role: galaxy/com.devture.ansible.role.docker_sdk_for_python
|
||||||
|
tags:
|
||||||
|
- setup-docker
|
||||||
|
- setup-all
|
||||||
|
- install-docker
|
||||||
|
- install-all
|
||||||
|
|
||||||
|
- when: devture_timesync_installation_enabled | bool
|
||||||
|
role: galaxy/com.devture.ansible.role.timesync
|
||||||
|
tags:
|
||||||
|
- setup-timesync
|
||||||
|
- setup-all
|
||||||
|
- install-timesync
|
||||||
|
- install-all
|
||||||
|
|
||||||
|
- custom/matrix-base
|
||||||
|
- custom/matrix-dynamic-dns
|
||||||
|
- custom/matrix-mailer
|
||||||
|
|
||||||
|
- role: galaxy/com.devture.ansible.role.postgres
|
||||||
|
|
||||||
|
- custom/matrix-redis
|
||||||
|
- custom/matrix-corporal
|
||||||
|
- custom/matrix-bridge-appservice-discord
|
||||||
|
- custom/matrix-bridge-appservice-slack
|
||||||
|
- custom/matrix-bridge-appservice-webhooks
|
||||||
|
- custom/matrix-bridge-appservice-irc
|
||||||
|
- custom/matrix-bridge-appservice-kakaotalk
|
||||||
|
- custom/matrix-bridge-beeper-linkedin
|
||||||
|
- custom/matrix-bridge-go-skype-bridge
|
||||||
|
- custom/matrix-bridge-mautrix-facebook
|
||||||
|
- custom/matrix-bridge-mautrix-twitter
|
||||||
|
- custom/matrix-bridge-mautrix-hangouts
|
||||||
|
- custom/matrix-bridge-mautrix-googlechat
|
||||||
|
- custom/matrix-bridge-mautrix-instagram
|
||||||
|
- custom/matrix-bridge-mautrix-signal
|
||||||
|
- custom/matrix-bridge-mautrix-telegram
|
||||||
|
- custom/matrix-bridge-mautrix-whatsapp
|
||||||
|
- custom/matrix-bridge-mautrix-discord
|
||||||
|
- custom/matrix-bridge-mx-puppet-discord
|
||||||
|
- custom/matrix-bridge-mx-puppet-groupme
|
||||||
|
- custom/matrix-bridge-mx-puppet-steam
|
||||||
|
- custom/matrix-bridge-mx-puppet-slack
|
||||||
|
- custom/matrix-bridge-mx-puppet-twitter
|
||||||
|
- custom/matrix-bridge-mx-puppet-instagram
|
||||||
|
- custom/matrix-bridge-sms
|
||||||
|
- custom/matrix-bridge-heisenbridge
|
||||||
|
- custom/matrix-bridge-hookshot
|
||||||
|
- custom/matrix-bot-matrix-reminder-bot
|
||||||
|
- custom/matrix-bot-matrix-registration-bot
|
||||||
|
- custom/matrix-bot-maubot
|
||||||
|
- custom/matrix-bot-buscarron
|
||||||
|
- custom/matrix-bot-honoroit
|
||||||
|
- custom/matrix-bot-postmoogle
|
||||||
|
- custom/matrix-bot-go-neb
|
||||||
|
- custom/matrix-bot-mjolnir
|
||||||
|
- custom/matrix-cactus-comments
|
||||||
|
- custom/matrix-synapse
|
||||||
|
- custom/matrix-synapse-reverse-proxy-companion
|
||||||
|
- custom/matrix-dendrite
|
||||||
|
- custom/matrix-conduit
|
||||||
|
- custom/matrix-synapse-admin
|
||||||
|
- custom/matrix-prometheus-node-exporter
|
||||||
|
- custom/matrix-prometheus-postgres-exporter
|
||||||
|
- custom/matrix-prometheus-nginxlog-exporter
|
||||||
|
- custom/matrix-prometheus
|
||||||
|
- custom/matrix-grafana
|
||||||
|
- custom/matrix-registration
|
||||||
|
- custom/matrix-client-element
|
||||||
|
- custom/matrix-client-hydrogen
|
||||||
|
- custom/matrix-client-cinny
|
||||||
|
- custom/matrix-jitsi
|
||||||
|
- custom/matrix-ldap-registration-proxy
|
||||||
|
- custom/matrix-ma1sd
|
||||||
|
- custom/matrix-dimension
|
||||||
|
- custom/matrix-etherpad
|
||||||
|
- custom/matrix-email2matrix
|
||||||
|
- custom/matrix-sygnal
|
||||||
|
- custom/matrix-ntfy
|
||||||
|
- custom/matrix-nginx-proxy
|
||||||
|
- custom/matrix-coturn
|
||||||
|
- custom/matrix-aux
|
||||||
|
|
||||||
|
- role: galaxy/com.devture.ansible.role.postgres_backup
|
||||||
|
|
||||||
|
- custom/matrix-backup-borg
|
||||||
|
|
||||||
|
- custom/matrix-user-creator
|
||||||
|
- custom/matrix-common-after
|
||||||
|
|
||||||
|
- when: devture_systemd_service_manager_enabled | bool
|
||||||
|
role: galaxy/com.devture.ansible.role.systemd_service_manager
|
||||||
|
|
||||||
|
# This is pretty much last, because we want it to better serve as a "last known good configuration".
|
||||||
|
# See: https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2217#issuecomment-1301487601
|
||||||
|
- when: devture_playbook_state_preserver_enabled | bool
|
||||||
|
role: galaxy/com.devture.ansible.role.playbook_state_preserver
|
||||||
|
tags:
|
||||||
|
- setup-all
|
||||||
|
- install-all
|
||||||
|
|
||||||
|
- role: galaxy/com.devture.ansible.role.playbook_runtime_messages
|
@ -1,7 +1,9 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup.yml"
|
- block:
|
||||||
when: run_stop | bool
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup.yml"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-aux-files
|
- setup-aux-files
|
||||||
|
- install-all
|
||||||
|
- install-aux-files
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
- ansible.builtin.set_fact:
|
|
||||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-backup-borg.timer'] }}"
|
|
||||||
when: matrix_backup_borg_enabled | bool
|
|
@ -1,23 +1,20 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml"
|
- block:
|
||||||
tags:
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||||
- always
|
when: "run_setup | bool and matrix_backup_borg_enabled | bool"
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
|
||||||
when: "run_setup | bool and matrix_backup_borg_enabled | bool"
|
|
||||||
tags:
|
|
||||||
- setup-all
|
|
||||||
- setup-backup-borg
|
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||||
when: "run_setup | bool and matrix_backup_borg_enabled | bool"
|
when: "run_setup | bool and matrix_backup_borg_enabled | bool"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-backup-borg
|
- setup-backup-borg
|
||||||
|
- install-all
|
||||||
|
- install-backup-borg
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
- block:
|
||||||
when: "run_setup | bool and not matrix_backup_borg_enabled | bool"
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||||
|
when: "run_setup | bool and not matrix_backup_borg_enabled | bool"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-backup-borg
|
- setup-backup-borg
|
||||||
|
@ -1,41 +1,25 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Check existence of matrix-backup-borg service
|
- name: Check existence of matrix-backup-borg service
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.service"
|
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.service"
|
||||||
register: matrix_backup_borg_service_stat
|
register: matrix_backup_borg_service_stat
|
||||||
|
|
||||||
- name: Ensure matrix-backup-borg is stopped
|
- when: matrix_backup_borg_service_stat.stat.exists | bool
|
||||||
ansible.builtin.service:
|
block:
|
||||||
name: matrix-backup-borg
|
- name: Ensure matrix-backup-borg is stopped
|
||||||
state: stopped
|
ansible.builtin.service:
|
||||||
enabled: false
|
name: matrix-backup-borg
|
||||||
daemon_reload: true
|
state: stopped
|
||||||
register: stopping_result
|
enabled: false
|
||||||
when: "matrix_backup_borg_service_stat.stat.exists | bool"
|
daemon_reload: true
|
||||||
|
|
||||||
- name: Ensure matrix-backup-borg.service doesn't exist
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.service"
|
|
||||||
state: absent
|
|
||||||
when: "matrix_backup_borg_service_stat.stat.exists | bool"
|
|
||||||
|
|
||||||
- name: Ensure matrix-backup-borg.timer doesn't exist
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.timer"
|
|
||||||
state: absent
|
|
||||||
when: "matrix_backup_borg_service_stat.stat.exists | bool"
|
|
||||||
|
|
||||||
- name: Ensure systemd reloaded after matrix-backup-borg.service removal
|
|
||||||
ansible.builtin.service:
|
|
||||||
daemon_reload: true
|
|
||||||
when: "matrix_backup_borg_service_stat.stat.exists | bool"
|
|
||||||
|
|
||||||
- name: Ensure Matrix borg paths don't exist
|
- name: Ensure matrix-backup-borg.service doesn't exist
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ matrix_backup_borg_base_path }}"
|
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.service"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Ensure borg Docker image doesn't exist
|
- name: Ensure matrix-backup-borg.timer doesn't exist
|
||||||
community.docker.docker_image:
|
ansible.builtin.file:
|
||||||
name: "{{ matrix_backup_borg_docker_image }}"
|
path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.timer"
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Get rid of old files and directories
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ item }}"
|
|
||||||
state: absent
|
|
||||||
with_items:
|
|
||||||
- "{{ matrix_base_data_path }}/environment-variables"
|
|
||||||
- "{{ matrix_base_data_path }}/scratchpad"
|
|
@ -1,37 +1,39 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/sanity_check.yml"
|
- block:
|
||||||
tags:
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||||
- always
|
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/clean_up_old_files.yml"
|
|
||||||
when: run_setup | bool
|
|
||||||
tags:
|
|
||||||
- setup-all
|
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/server_base/setup.yml"
|
|
||||||
when: run_setup | bool
|
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
|
- install-all
|
||||||
|
|
||||||
# This needs to always run, because it populates `matrix_user_uid` and `matrix_user_gid`,
|
# This needs to always run, because it populates `matrix_user_uid` and `matrix_user_gid`,
|
||||||
# which are required by many other roles.
|
# which are required by many other roles.
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_matrix_user.yml"
|
- block:
|
||||||
when: run_setup | bool
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_matrix_user.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
- setup-system-user
|
- setup-system-user
|
||||||
|
- common
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_matrix_base.yml"
|
- block:
|
||||||
when: run_setup | bool
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_matrix_base.yml"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
|
- install-all
|
||||||
|
- common
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_well_known.yml"
|
- block:
|
||||||
when: run_setup | bool
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_well_known.yml"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-ma1sd
|
- setup-ma1sd
|
||||||
- setup-synapse
|
- setup-synapse
|
||||||
- setup-dendrite
|
- setup-dendrite
|
||||||
|
- setup-conduit
|
||||||
- setup-nginx-proxy
|
- setup-nginx-proxy
|
||||||
|
- install-all
|
||||||
|
- install-ma1sd
|
||||||
|
- install-synapse
|
||||||
|
- install-dendrite
|
||||||
|
- install-conduit
|
||||||
|
- install-nginx-proxy
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_redhat.yml"
|
|
||||||
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int < 8
|
|
||||||
|
|
||||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_redhat8.yml"
|
|
||||||
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 7 and ansible_distribution_major_version | int < 30
|
|
||||||
|
|
||||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_fedora.yml"
|
|
||||||
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 30
|
|
||||||
|
|
||||||
- when: ansible_os_family == 'Debian'
|
|
||||||
block:
|
|
||||||
# ansible_lsb is only available if lsb-release is installed.
|
|
||||||
- name: Ensure lsb-release installed
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name:
|
|
||||||
- lsb-release
|
|
||||||
state: present
|
|
||||||
update_cache: true
|
|
||||||
register: lsb_release_installation_result
|
|
||||||
|
|
||||||
- name: Reread ansible_lsb facts if lsb-release got installed
|
|
||||||
ansible.builtin.setup:
|
|
||||||
filter: ansible_lsb*
|
|
||||||
when: lsb_release_installation_result.changed
|
|
||||||
|
|
||||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_debian.yml"
|
|
||||||
when: (ansible_os_family == 'Debian') and (ansible_lsb.id != 'Raspbian')
|
|
||||||
|
|
||||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_raspbian.yml"
|
|
||||||
when: (ansible_os_family == 'Debian') and (ansible_lsb.id == 'Raspbian')
|
|
||||||
|
|
||||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_archlinux.yml"
|
|
||||||
when: ansible_distribution == 'Archlinux'
|
|
||||||
|
|
||||||
- name: Ensure Docker is started and autoruns
|
|
||||||
ansible.builtin.service:
|
|
||||||
name: docker
|
|
||||||
state: started
|
|
||||||
enabled: true
|
|
@ -1,16 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Install host dependencies
|
|
||||||
community.general.pacman:
|
|
||||||
name:
|
|
||||||
- python-docker
|
|
||||||
- python-dnspython
|
|
||||||
state: present
|
|
||||||
update_cache: true
|
|
||||||
|
|
||||||
- name: Ensure Docker is installed
|
|
||||||
community.general.pacman:
|
|
||||||
name:
|
|
||||||
- docker
|
|
||||||
state: present
|
|
||||||
when: matrix_docker_installation_enabled | bool
|
|
@ -1,34 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Ensure APT usage dependencies are installed
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name:
|
|
||||||
- apt-transport-https
|
|
||||||
- ca-certificates
|
|
||||||
- gnupg
|
|
||||||
state: present
|
|
||||||
update_cache: true
|
|
||||||
|
|
||||||
- name: Ensure Docker's APT key is trusted
|
|
||||||
ansible.builtin.apt_key:
|
|
||||||
url: "https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg"
|
|
||||||
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
|
|
||||||
state: present
|
|
||||||
register: add_repository_key
|
|
||||||
ignore_errors: true
|
|
||||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
|
||||||
|
|
||||||
- name: Ensure Docker repository is enabled
|
|
||||||
ansible.builtin.apt_repository:
|
|
||||||
repo: "deb [arch={{ matrix_debian_arch }}] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable"
|
|
||||||
state: present
|
|
||||||
update_cache: true
|
|
||||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
|
||||||
|
|
||||||
- name: Ensure Docker is installed
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name:
|
|
||||||
- "{{ matrix_docker_package_name }}"
|
|
||||||
- "python{{ '3' if ansible_python.version.major == 3 else '' }}-docker"
|
|
||||||
state: present
|
|
||||||
when: matrix_docker_installation_enabled | bool
|
|
@ -1,32 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Ensure Docker repository is enabled
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: "{{ role_path }}/files/yum.repos.d/{{ item }}"
|
|
||||||
dest: "/etc/yum.repos.d/docker-ce.repo"
|
|
||||||
owner: "root"
|
|
||||||
group: "root"
|
|
||||||
mode: 0644
|
|
||||||
with_items:
|
|
||||||
- docker-ce-fedora.repo
|
|
||||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
|
||||||
|
|
||||||
- name: Ensure Docker's RPM key is trusted
|
|
||||||
ansible.builtin.rpm_key:
|
|
||||||
state: present
|
|
||||||
key: https://download.docker.com/linux/fedora/gpg
|
|
||||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
|
||||||
|
|
||||||
- name: Ensure Docker is installed
|
|
||||||
ansible.builtin.yum:
|
|
||||||
name:
|
|
||||||
- "{{ matrix_docker_package_name }}"
|
|
||||||
- python3-pip
|
|
||||||
state: present
|
|
||||||
when: matrix_docker_installation_enabled | bool
|
|
||||||
|
|
||||||
- name: Ensure Docker-Py is installed
|
|
||||||
ansible.builtin.pip:
|
|
||||||
name: docker-py
|
|
||||||
state: present
|
|
||||||
when: matrix_docker_installation_enabled | bool
|
|
@ -1,34 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Ensure APT usage dependencies are installed
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name:
|
|
||||||
- apt-transport-https
|
|
||||||
- ca-certificates
|
|
||||||
- gnupg
|
|
||||||
state: present
|
|
||||||
update_cache: true
|
|
||||||
|
|
||||||
- name: Ensure Docker's APT key is trusted
|
|
||||||
ansible.builtin.apt_key:
|
|
||||||
url: https://download.docker.com/linux/raspbian/gpg
|
|
||||||
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
|
|
||||||
state: present
|
|
||||||
register: add_repository_key
|
|
||||||
ignore_errors: true
|
|
||||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
|
||||||
|
|
||||||
- name: Ensure Docker repository is enabled
|
|
||||||
ansible.builtin.apt_repository:
|
|
||||||
repo: "deb [arch={{ matrix_debian_arch }}] https://download.docker.com/linux/raspbian {{ ansible_distribution_release }} stable"
|
|
||||||
state: present
|
|
||||||
update_cache: true
|
|
||||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
|
||||||
|
|
||||||
- name: Ensure Docker is installed
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name:
|
|
||||||
- "{{ matrix_docker_package_name }}"
|
|
||||||
- "python{{ '3' if ansible_python.version.major == 3 else '' }}-docker"
|
|
||||||
state: present
|
|
||||||
when: matrix_docker_installation_enabled | bool
|
|
@ -1,24 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Ensure Docker repository is enabled
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: "{{ role_path }}/files/yum.repos.d/docker-ce-centos.repo"
|
|
||||||
dest: "/etc/yum.repos.d/docker-ce.repo"
|
|
||||||
owner: "root"
|
|
||||||
group: "root"
|
|
||||||
mode: 0644
|
|
||||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
|
||||||
|
|
||||||
- name: Ensure Docker's RPM key is trusted
|
|
||||||
ansible.builtin.rpm_key:
|
|
||||||
state: present
|
|
||||||
key: https://download.docker.com/linux/centos/gpg
|
|
||||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
|
||||||
|
|
||||||
- name: Ensure Docker is installed
|
|
||||||
ansible.builtin.yum:
|
|
||||||
name:
|
|
||||||
- "{{ matrix_docker_package_name }}"
|
|
||||||
- docker-python
|
|
||||||
state: present
|
|
||||||
when: matrix_docker_installation_enabled | bool
|
|
@ -1,37 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Ensure Docker repository is enabled
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: "{{ role_path }}/files/yum.repos.d/docker-ce-centos.repo"
|
|
||||||
dest: "/etc/yum.repos.d/docker-ce.repo"
|
|
||||||
owner: "root"
|
|
||||||
group: "root"
|
|
||||||
mode: 0644
|
|
||||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
|
||||||
|
|
||||||
- name: Ensure Docker's RPM key is trusted
|
|
||||||
ansible.builtin.rpm_key:
|
|
||||||
state: present
|
|
||||||
key: https://download.docker.com/linux/centos/gpg
|
|
||||||
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce'
|
|
||||||
|
|
||||||
- name: Ensure EPEL is installed
|
|
||||||
ansible.builtin.yum:
|
|
||||||
name:
|
|
||||||
- epel-release
|
|
||||||
state: present
|
|
||||||
update_cache: true
|
|
||||||
|
|
||||||
- name: Ensure Docker is installed
|
|
||||||
ansible.builtin.yum:
|
|
||||||
name:
|
|
||||||
- "{{ matrix_docker_package_name }}"
|
|
||||||
- python3-pip
|
|
||||||
state: present
|
|
||||||
when: matrix_docker_installation_enabled | bool
|
|
||||||
|
|
||||||
- name: Ensure Docker-Py is installed
|
|
||||||
ansible.builtin.pip:
|
|
||||||
name: docker-py
|
|
||||||
state: present
|
|
||||||
when: matrix_docker_installation_enabled | bool
|
|
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
# This will contain a list of enabled services that the playbook is managing.
|
|
||||||
# Each component is expected to append its service name to this list.
|
|
||||||
matrix_systemd_services_list: []
|
|
||||||
|
|
||||||
matrix_homeserver_container_runtime_injected_arguments: []
|
|
||||||
matrix_homeserver_app_service_runtime_injected_config_files: []
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- ansible.builtin.set_fact:
|
|
||||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-buscarron.service'] }}"
|
|
||||||
when: matrix_bot_buscarron_enabled | bool
|
|
@ -1,23 +1,20 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml"
|
- block:
|
||||||
tags:
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||||
- always
|
when: "run_setup | bool and matrix_bot_buscarron_enabled | bool"
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
|
||||||
when: "run_setup | bool and matrix_bot_buscarron_enabled | bool"
|
|
||||||
tags:
|
|
||||||
- setup-all
|
|
||||||
- setup-bot-buscarron
|
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||||
when: "run_setup | bool and matrix_bot_buscarron_enabled | bool"
|
when: "run_setup | bool and matrix_bot_buscarron_enabled | bool"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-buscarron
|
- setup-bot-buscarron
|
||||||
|
- install-all
|
||||||
|
- install-bot-buscarron
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
- block:
|
||||||
when: "run_setup | bool and not matrix_bot_buscarron_enabled | bool"
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||||
|
when: "run_setup | bool and not matrix_bot_buscarron_enabled | bool"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-buscarron
|
- setup-bot-buscarron
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Fail if required settings not defined
|
- name: Fail if required Buscarron settings not defined
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
You need to define a required configuration setting (`{{ item }}`).
|
You need to define a required configuration setting (`{{ item.name }}`).
|
||||||
when: "vars[item] == ''"
|
when: "item.when | bool and vars[item.name] == ''"
|
||||||
with_items:
|
with_items:
|
||||||
- "matrix_bot_buscarron_password"
|
- {'name': 'matrix_bot_buscarron_password', when: true}
|
||||||
|
- {'name': 'matrix_bot_buscarron_database_hostname', when: "{{ matrix_bot_buscarron_database_engine == 'postgres' }}"}
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- ansible.builtin.set_fact:
|
|
||||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-go-neb.service'] }}"
|
|
||||||
when: matrix_bot_go_neb_enabled | bool
|
|
@ -1,23 +1,20 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml"
|
- block:
|
||||||
tags:
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||||
- always
|
when: "run_setup | bool and matrix_bot_go_neb_enabled | bool"
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
|
||||||
when: "run_setup | bool and matrix_bot_go_neb_enabled | bool"
|
|
||||||
tags:
|
|
||||||
- setup-all
|
|
||||||
- setup-bot-go-neb
|
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||||
when: "run_setup | bool and matrix_bot_go_neb_enabled | bool"
|
when: "run_setup | bool and matrix_bot_go_neb_enabled | bool"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-go-neb
|
- setup-bot-go-neb
|
||||||
|
- install-all
|
||||||
|
- install-bot-go-neb
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
- block:
|
||||||
when: "run_setup | bool and not matrix_bot_go_neb_enabled | bool"
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||||
|
when: "run_setup | bool and not matrix_bot_go_neb_enabled | bool"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-go-neb
|
- setup-bot-go-neb
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- ansible.builtin.set_fact:
|
|
||||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-honoroit.service'] }}"
|
|
||||||
when: matrix_bot_honoroit_enabled | bool
|
|
@ -1,23 +1,20 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml"
|
- block:
|
||||||
tags:
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||||
- always
|
when: "run_setup | bool and matrix_bot_honoroit_enabled | bool"
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
|
||||||
when: "run_setup | bool and matrix_bot_honoroit_enabled | bool"
|
|
||||||
tags:
|
|
||||||
- setup-all
|
|
||||||
- setup-bot-honoroit
|
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||||
when: "run_setup | bool and matrix_bot_honoroit_enabled | bool"
|
when: "run_setup | bool and matrix_bot_honoroit_enabled | bool"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-honoroit
|
- setup-bot-honoroit
|
||||||
|
- install-all
|
||||||
|
- install-bot-honoroit
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
- block:
|
||||||
when: "run_setup | bool and not matrix_bot_honoroit_enabled | bool"
|
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||||
|
when: "run_setup | bool and not matrix_bot_honoroit_enabled | bool"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-honoroit
|
- setup-bot-honoroit
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Fail if required settings not defined
|
- name: Fail if required honoroit settings not defined
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
You need to define a required configuration setting (`{{ item }}`).
|
You need to define a required configuration setting (`{{ item.name }}`).
|
||||||
when: "vars[item] == ''"
|
when: "item.when | bool and vars[item.name] == ''"
|
||||||
with_items:
|
with_items:
|
||||||
- "matrix_bot_honoroit_password"
|
- {'name': 'matrix_bot_honoroit_password', when: true}
|
||||||
- "matrix_bot_honoroit_roomid"
|
- {'name': 'matrix_bot_honoroit_roomid', when: true}
|
||||||
|
- {'name': 'matrix_bot_honoroit_database_hostname', when: "{{ matrix_bot_honoroit_database_engine == 'postgres' }}"}
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- ansible.builtin.set_fact:
|
|
||||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-matrix-registration-bot.service'] }}"
|
|
||||||
when: matrix_bot_matrix_registration_bot_enabled | bool
|
|
@ -1,23 +1,20 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml"
|
- block:
|
||||||
tags:
|
- when: matrix_bot_matrix_registration_bot_enabled | bool
|
||||||
- always
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
|
||||||
when: "run_setup | bool and matrix_bot_matrix_registration_bot_enabled | bool"
|
|
||||||
tags:
|
|
||||||
- setup-all
|
|
||||||
- setup-bot-matrix-registration-bot
|
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
- when: matrix_bot_matrix_registration_bot_enabled | bool
|
||||||
when: "run_setup | bool and matrix_bot_matrix_registration_bot_enabled | bool"
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-matrix-registration-bot
|
- setup-bot-matrix-registration-bot
|
||||||
|
- install-all
|
||||||
|
- install-bot-matrix-registration-bot
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
- block:
|
||||||
when: "run_setup | bool and not matrix_bot_matrix_registration_bot_enabled | bool"
|
- when: not matrix_bot_matrix_registration_bot_enabled | bool
|
||||||
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-matrix-registration-bot
|
- setup-bot-matrix-registration-bot
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- ansible.builtin.set_fact:
|
|
||||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-matrix-reminder-bot.service'] }}"
|
|
||||||
when: matrix_bot_matrix_reminder_bot_enabled | bool
|
|
@ -1,23 +1,20 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml"
|
- block:
|
||||||
tags:
|
- when: matrix_bot_matrix_reminder_bot_enabled | bool
|
||||||
- always
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
|
||||||
when: "run_setup | bool and matrix_bot_matrix_reminder_bot_enabled | bool"
|
|
||||||
tags:
|
|
||||||
- setup-all
|
|
||||||
- setup-bot-matrix-reminder-bot
|
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
- when: matrix_bot_matrix_reminder_bot_enabled | bool
|
||||||
when: "run_setup | bool and matrix_bot_matrix_reminder_bot_enabled | bool"
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-matrix-reminder-bot
|
- setup-bot-matrix-reminder-bot
|
||||||
|
- install-all
|
||||||
|
- install-bot-matrix-reminder-bot
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
- block:
|
||||||
when: "run_setup | bool and not matrix_bot_matrix_reminder_bot_enabled | bool"
|
- when: not matrix_bot_matrix_reminder_bot_enabled | bool
|
||||||
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-matrix-reminder-bot
|
- setup-bot-matrix-reminder-bot
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Add maubot to the systemd service list
|
|
||||||
ansible.builtin.set_fact:
|
|
||||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-maubot.service'] }}"
|
|
||||||
when: matrix_bot_maubot_enabled | bool
|
|
||||||
|
|
||||||
- name: Configure nginx for maubot
|
- name: Configure nginx for maubot
|
||||||
block:
|
block:
|
||||||
- name: Generate Maubot proxying configuration for matrix-nginx-proxy
|
- name: Generate Maubot proxying configuration for matrix-nginx-proxy
|
@ -1,23 +1,29 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml"
|
- block:
|
||||||
tags:
|
- when: matrix_bot_maubot_enabled | bool
|
||||||
- always
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/inject_into_nginx_proxy.yml"
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
|
||||||
when: "run_setup|bool and matrix_bot_maubot_enabled|bool"
|
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-maubot
|
- setup-nginx-proxy
|
||||||
|
- install-all
|
||||||
|
- install-nginx-proxy
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- when: matrix_bot_maubot_enabled | bool
|
||||||
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
- when: matrix_bot_maubot_enabled | bool
|
||||||
when: "run_setup|bool and matrix_bot_maubot_enabled|bool"
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-maubot
|
- setup-bot-maubot
|
||||||
|
- install-all
|
||||||
|
- install-bot-maubot
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
- block:
|
||||||
when: "run_setup|bool and not matrix_bot_maubot_enabled|bool"
|
- when: not matrix_bot_maubot_enabled | bool
|
||||||
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-maubot
|
- setup-bot-maubot
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Fail if required settings not defined
|
- name: Fail if required maubot settings not defined
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
You need to define a required configuration setting (`{{ item }}`).
|
You need to define a required configuration setting (`{{ item.name }}`).
|
||||||
when: "vars[item] == ''"
|
when: "item.when | bool and vars[item.name] == ''"
|
||||||
with_items:
|
with_items:
|
||||||
- matrix_bot_maubot_unshared_secret
|
- {'name': 'matrix_bot_maubot_unshared_secret', when: true}
|
||||||
- matrix_bot_maubot_admins
|
- {'name': 'matrix_bot_maubot_admins', when: true}
|
||||||
|
- {'name': 'matrix_bot_maubot_database_hostname', when: "{{ matrix_bot_maubot_database_engine == 'postgres' }}"}
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
# See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1070
|
|
||||||
# and https://github.com/spantaleev/matrix-docker-ansible-deploy/commit/1ab507349c752042d26def3e95884f6df8886b74#commitcomment-51108407
|
|
||||||
- name: Fail if trying to self-build on Ansible < 2.8
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: "To self-build the Mjolnir image, you should use Ansible 2.8 or higher. See docs/ansible.md"
|
|
||||||
when: "ansible_version.major == 2 and ansible_version.minor < 8 and matrix_bot_mjolnir_container_image_self_build and matrix_bot_mjolnir_enabled"
|
|
||||||
|
|
||||||
- ansible.builtin.set_fact:
|
|
||||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-bot-mjolnir.service'] }}"
|
|
||||||
when: matrix_bot_mjolnir_enabled | bool
|
|
@ -1,23 +1,20 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml"
|
- block:
|
||||||
tags:
|
- when: matrix_bot_mjolnir_enabled | bool
|
||||||
- always
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
|
||||||
when: "run_setup | bool and matrix_bot_mjolnir_enabled | bool"
|
|
||||||
tags:
|
|
||||||
- setup-all
|
|
||||||
- setup-bot-mjolnir
|
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
- when: matrix_bot_mjolnir_enabled | bool
|
||||||
when: "run_setup | bool and matrix_bot_mjolnir_enabled | bool"
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-mjolnir
|
- setup-bot-mjolnir
|
||||||
|
- install-all
|
||||||
|
- install-bot-mjolnir
|
||||||
|
|
||||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
- block:
|
||||||
when: "run_setup | bool and not matrix_bot_mjolnir_enabled | bool"
|
- when: not matrix_bot_mjolnir_enabled | bool
|
||||||
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
|
||||||
tags:
|
tags:
|
||||||
- setup-all
|
- setup-all
|
||||||
- setup-bot-mjolnir
|
- setup-bot-mjolnir
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue