| @@ -13,7 +13,7 @@ jobs: | |||
| - name: Check out | |||
| uses: actions/checkout@v3 | |||
| - name: Run yamllint | |||
| uses: frenck/action-yamllint@v1.3.0 | |||
| uses: frenck/action-yamllint@v1.3.1 | |||
| ansible-lint: | |||
| name: ansible-lint | |||
| runs-on: ubuntu-latest | |||
| @@ -1,8 +1,5 @@ | |||
| --- | |||
| extends: default | |||
| ignore: | | |||
| roles/custom/matrix-synapse/vars/workers.yml | |||
| rules: | |||
| line-length: disable | |||
| @@ -1,3 +1,18 @@ | |||
| # 2022-11-05 | |||
| ## (Backward Compatibility Break) A new default standalone mode for Etherpad | |||
| Until now, [Etherpad](https://etherpad.org/) (which [the playbook could install for you](docs/configuring-playbook-etherpad.md)) required the [Dimension integration manager](docs/configuring-playbook-dimension.md) to also be installed, because Etherpad was hosted on the Dimension domain (at `dimension.DOMAIN/etherpad`). | |||
| From now on, Etherpad can be installed in `standalone` mode on `etherpad.DOMAIN` and used even without Dimension. This is much more versatile, so the playbook now defaults to this new mode (`matrix_etherpad_mode: standalone`). | |||
| If you've already got both Etherpad and Dimension in use you could: | |||
| - **either** keep hosting Etherpad under the Dimension domain by adding `matrix_etherpad_mode: dimension` to your `vars.yml` file. All your existing room widgets will continue working at the same URLs and no other changes will be necessary. | |||
| - **or**, you could change to hosting Etherpad separately on `etherpad.DOMAIN`. You will need to [configure a DNS record](docs/configuring-dns.md) for this new domain. You will also need to reconfigure Dimension to use the new pad URLs (`https://etherpad.DOMAIN/...`) going forward (refer to our [configuring Etherpad documentation](docs/configuring-playbook-etherpad.md)). All your existing room widgets (which still use `https://dimension.DOMAIN/etherpad/...`) will break as Etherpad is not hosted there anymore. You will need to re-add them or to consider not using `standalone` mode | |||
| # 2022-11-04 | |||
| ## The playbook now uses external roles for some things | |||
| @@ -16,7 +31,7 @@ We're doing this for greater code-reuse (across Ansible playbooks, including our | |||
| Some variable names will change during the transition to having more and more external (galaxy) roles. There's a new `custom/matrix_playbook_migration` role added to the playbook which will tell you about these changes each time you run the playbook. | |||
| From now on, every time you update the playbook (well, every time the `requirements.yml` file changes), it's best to run `make roles` to update the roles downloaded from other sources. | |||
| **From now on**, every time you update the playbook (well, every time the `requirements.yml` file changes), it's best to run `make roles` to update the roles downloaded from other sources. `make roles` is a shortcut (a `roles` target defined in [`Makefile`](Makefile) and executed by the [`make`](https://www.gnu.org/software/make/) utility) which ultimately runs [ansible-galaxy](https://docs.ansible.com/ansible/latest/cli/ansible-galaxy.html) to download Ansible roles. If you don't have `make`, you can also manually run the commands seen in the `Makefile`. | |||
| # 2022-10-14 | |||
| @@ -45,10 +45,7 @@ Alternatively, you can run Ansible inside a Docker container (powered by the [de | |||
| This ensures that you're using a very recent Ansible version, which is less likely to be incompatible with the playbook. | |||
| There are 2 ways to go about it: | |||
| - [Running Ansible in a container on the Matrix server itself](#running-ansible-in-a-container-on-the-matrix-server-itself) | |||
| - [Running Ansible in a container on another computer (not the Matrix server)](#running-ansible-in-a-container-on-another-computer-not-the-matrix-server) | |||
| 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 | |||
| @@ -73,13 +70,15 @@ docker run -it --rm \ | |||
| -w /work \ | |||
| -v `pwd`:/work \ | |||
| --entrypoint=/bin/sh \ | |||
| docker.io/devture/ansible:2.13.0-r0 | |||
| docker.io/devture/ansible:2.13.6-r0 | |||
| ``` | |||
| Once you execute the above command, you'll be dropped into a `/work` directory inside a Docker container. | |||
| The `/work` directory contains the playbook's code. | |||
| You can execute `ansible-playbook ...` (or `ansible-playbook --connection=community.docker.nsenter ...`) commands as per normal now. | |||
| First, consider running `git config --global --add safe.directory /work` to [resolve directory ownership issues](#resolve-directory-ownership-issues). | |||
| 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) | |||
| @@ -92,7 +91,7 @@ docker run -it --rm \ | |||
| -v `pwd`:/work \ | |||
| -v $HOME/.ssh/id_rsa:/root/.ssh/id_rsa:ro \ | |||
| --entrypoint=/bin/sh \ | |||
| docker.io/devture/ansible:2.13.0-r0 | |||
| docker.io/devture/ansible:2.13.6-r0 | |||
| ``` | |||
| The above command tries to mount an SSH key (`$HOME/.ssh/id_rsa`) into the container (at `/root/.ssh/id_rsa`). | |||
| @@ -101,7 +100,10 @@ If your SSH key is at a different path (not in `$HOME/.ssh/id_rsa`), adjust that | |||
| Once you execute the above command, you'll be dropped into a `/work` directory inside a Docker container. | |||
| The `/work` directory contains the playbook's code. | |||
| You can execute `ansible-playbook ...` commands as per normal now. | |||
| First, consider running `git config --global --add safe.directory /work` to [resolve directory ownership issues](#resolve-directory-ownership-issues). | |||
| Finally, you execute `ansible-playbook ...` commands as per normal now. | |||
| #### If you don't use SSH keys for authentication | |||
| @@ -112,3 +114,13 @@ 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: | |||
| > fatal: unsafe repository ('/work' is owned by someone else) | |||
| > To add an exception for this directory, call: | |||
| > git config --global --add safe.directory /work | |||
| These errors can be resolved by making `git` trust the playbook directory by running `git config --global --add safe.directory /work` | |||
| @@ -39,6 +39,7 @@ When you're done configuring DNS, proceed to [Configuring the playbook](configur | |||
| | [Go-NEB](configuring-playbook-bot-go-neb.md) bot | CNAME | `goneb` | - | - | - | `matrix.<your-domain>` | | |||
| | [Sygnal](configuring-playbook-sygnal.md) push notification gateway | CNAME | `sygnal` | - | - | - | `matrix.<your-domain>` | | |||
| | [ntfy](configuring-playbook-ntfy.md) push notifications server | CNAME | `ntfy` | - | - | - | `matrix.<your-domain>` | | |||
| | [Etherpad](configuring-playbook-etherpad.md) collaborative text editor | CNAME | `etherpad` | - | - | - | `matrix.<your-domain>` | | |||
| | [Hydrogen](configuring-playbook-client-hydrogen.md) web client | CNAME | `hydrogen` | - | - | - | `matrix.<your-domain>` | | |||
| | [Cinny](configuring-playbook-client-cinny.md) web client | CNAME | `cinny` | - | - | - | `matrix.<your-domain>` | | |||
| | [Buscarron](configuring-playbook-bot-buscarron.md) helpdesk bot | CNAME | `buscarron` | - | - | - | `matrix.<your-domain>` | | |||
| @@ -68,6 +69,8 @@ The `sygnal.<your-domain>` subdomain may be necessary, because this playbook cou | |||
| The `ntfy.<your-domain>` subdomain may be necessary, because this playbook could install the [ntfy](https://ntfy.sh/) UnifiedPush-compatible push notifications server. The installation of ntfy is disabled by default, it is not a core required component. To learn how to install it, see our [configuring ntfy guide](configuring-playbook-ntfy.md). If you do not wish to set up ntfy, feel free to skip the `ntfy.<your-domain>` DNS record. | |||
| The `etherpad.<your-domain>` subdomain may be necessary, because this playbook could install the [Etherpad](https://etherpad.org/) a highly customizable open source online editor providing collaborative editing in really real-time. The installation of etherpad is disabled by default, it is not a core required component. To learn how to install it, see our [configuring etherpad guide](configuring-playbook-etherpad.md). If you do not wish to set up etherpad, feel free to skip the `etherpad.<your-domain>` DNS record. | |||
| The `hydrogen.<your-domain>` subdomain may be necessary, because this playbook could install the [Hydrogen](https://github.com/vector-im/hydrogen-web) web client. The installation of Hydrogen is disabled by default, it is not a core required component. To learn how to install it, see our [configuring Hydrogen guide](configuring-playbook-client-hydrogen.md). If you do not wish to set up Hydrogen, feel free to skip the `hydrogen.<your-domain>` DNS record. | |||
| The `cinny.<your-domain>` subdomain may be necessary, because this playbook could install the [Cinny](https://github.com/ajbura/cinny) web client. The installation of cinny is disabled by default, it is not a core required component. To learn how to install it, see our [configuring cinny guide](configuring-playbook-client-cinny.md). If you do not wish to set up cinny, feel free to skip the `cinny.<your-domain>` DNS record. | |||
| @@ -3,7 +3,6 @@ | |||
| **Note**: bridging to [Discord](https://discordapp.com/) can also happen via the [mx-puppet-discord](configuring-playbook-bridge-mx-puppet-discord.md) and [matrix-appservice-discord](configuring-playbook-bridge-appservice-discord.md) bridges supported by the playbook. | |||
| - For using as a Bot we recommend the [Appservice Discord](configuring-playbook-bridge-appservice-discord.md), because it supports plumbing. | |||
| - For personal use with a discord account we recommend the `mautrix-discord` bridge (the one being discussed here), because it is the most fully-featured and stable of the 3 Discord bridges supported by the playbook. | |||
| The `mautrix-discord` bridge (the one being discussed here) is the most fully-featured and stable of the 3 Discord bridges supported by the playbook, so it's the one we recommend. | |||
| The playbook can install and configure [mautrix-discord](https://github.com/mautrix/discord) for you. | |||
| @@ -12,13 +11,10 @@ See the project's [documentation](https://docs.mau.fi/bridges/go/discord/index.h | |||
| ## Prerequisites | |||
| For using this bridge, you would need to authenticate by **scanning a QR code** with the Discord app on your phone **or** by using **discord account token**. | |||
| You can delete the Discord app after the authentication process. | |||
| There are 2 ways to login to discord using this bridge, either by [scanning a QR code](#method-1-login-using-qr-code-recommended) using the Discord mobile app **or** by using a [Discord token](#method-2-login-using-discord-token-not-recommended). | |||
| If this is a dealbreaker for you, consider using one of the other Discord bridges supported by the playbook: [mx-puppet-discord](configuring-playbook-bridge-mx-puppet-discord.md) or [matrix-appservice-discord](configuring-playbook-bridge-appservice-discord.md). These come with their own complexity and limitations, however, so we recommend that you proceed with this one if possible. | |||
| ## Installing | |||
| To enable the bridge, add this to your `vars.yml` file: | |||
| @@ -69,6 +65,20 @@ When using this method, **each user** that wishes to enable Double Puppeting nee | |||
| ## Usage | |||
| ### Logging in | |||
| #### Method 1: Login using QR code (recommended) | |||
| For using this bridge, you would need to authenticate by **scanning a QR code** with the Discord app on your phone. | |||
| You can delete the Discord app after the authentication process. | |||
| #### Method 2: Login using Discord token (not recommended) | |||
| To acquire the token, open Discord in a private browser window. Then open the developer settings (keyboard shortcut might be "ctrl+shift+i" or by pressing "F12"). Navigate to the "Network" tab then reload the page. In the URL filter or search bar type "/api" and find the response with the file name of "library". Under the request headers you should find a variable called "Authorization", this is the token to your Discord account. After copying the token, you can close the browser window. | |||
| ### Bridging | |||
| 1. Start a chat with `@discordbot:YOUR_DOMAIN` (where `YOUR_DOMAIN` is your base domain, not the `matrix.` domain). | |||
| 2. If you would like to login to Discord using a token, send `login-token` command, otherwise, send `login-qr` command. | |||
| 3. You'll see a QR code which you need to scan with the Discord app on your phone. You can scan it with the camera app too, which will open Discord, which will then instruct you to scan it a 2nd time in the Discord app. | |||
| @@ -1,12 +1,20 @@ | |||
| # Setting up Etherpad (optional) | |||
| [Etherpad](https://etherpad.org) is is an open source collaborative text editor that can be embedded in a Matrix chat room using the [Dimension integrations manager](https://dimension.t2bot.io) | |||
| [Etherpad](https://etherpad.org) is is an open source collaborative text editor that can be embedded in a Matrix chat room using the [Dimension integrations manager](https://dimension.t2bot.io) or used as standalone web app. | |||
| When enabled together with the Jitsi audio/video conferencing system (see [our docs on Jitsi](configuring-playbook-jitsi.md)), it will be made available as an option during the conferences. | |||
| ## Prerequisites | |||
| For the self-hosted Etherpad instance to be available to your users, you must first enable and configure the **Dimension integrations manager** as described in [the playbook documentation](configuring-playbook-dimension.md) | |||
| Etherpad can be installed in 2 modes: | |||
| - (default) `standalone` mode (`matrix_etherpad_mode: standalone`) - Etherpad will be hosted on `etherpad.<your-domain>` (`matrix_server_fqn_etherpad`), so the DNS record for this domian must be created. See [Configuring your DNS server](configuring-dns.md) on how to set up the `etherpad` DNS record correctly | |||
| - `dimension` mode (`matrix_etherpad_mode: dimension`) - Etherpad will be hosted on `dimension.<your-domain>/etherpad` (`matrix_server_fqn_dimension`). This requires that you **first** configure the **Dimension integrations manager** as described in [the playbook documentation](configuring-playbook-dimension.md) | |||
| We recomend that you go with the default (`standalone`) mode, which makes Etherpad independent and allows it to be used with or without Dimension. | |||
| ## Installing | |||
| @@ -14,35 +22,40 @@ For the self-hosted Etherpad instance to be available to your users, you must fi | |||
| ```yaml | |||
| matrix_etherpad_enabled: true | |||
| # Uncomment below if you'd like to install Etherpad on the Dimension domain (not recommended) | |||
| # matrix_etherpad_mode: dimension | |||
| # Uncomment below to enable the admin web UI | |||
| # matrix_etherpad_admin_username: admin | |||
| # matrix_etherpad_admin_password: some-password | |||
| ``` | |||
| ## Set Dimension default to the self-hosted Etherpad | |||
| If enabled, the admin web-UI should then be available on `https://etherpad.<your-domain>/admin` (or `https://dimension.<your-domain>/etherpad/admin`, if `matrix_etherpad_mode: dimension`) | |||
| The Dimension administrator users can configure the default URL template. The Dimension configuration menu can be accessed with the sprocket icon as you begin to add a widget to a room in Element. There you will find the Etherpad Widget Configuration action beneath the _Widgets_ tab. Replace `scalar.vector.im` with your own Dimension domain. | |||
| ### Removing the integrated Etherpad chat | |||
| ## Managing / Deleting old pads | |||
| If you wish to disable the Etherpad chat button, you can do it by appending `?showChat=false` to the end of the pad URL, or the template. | |||
| Example: `https://dimension.<your-domain>/etherpad/p/$roomId_$padName?showChat=false` | |||
| If you want to manage and remove old unused pads from Etherpad, you will first need to able Admin access as described above. | |||
| ### Etherpad Admin access (optional) | |||
| Then from the plugin manager page (`https://etherpad.<your-domain>/admin/plugins` or `https://dimension.<your-domain>/etherpad/admin/plugins`), install the `adminpads2` plugin. Once installed, you should have a "Manage pads" section in the Admin web-UI. | |||
| Etherpad comes with a admin web-UI which is disabled by default. You can enable it by setting a username and password in your configuration file (`inventory/host_vars/matrix.<your-domain>/vars.yml`): | |||
| ```yaml | |||
| matrix_etherpad_admin_username: admin | |||
| matrix_etherpad_admin_password: some-password | |||
| ``` | |||
| ## Set Dimension default to the self-hosted Etherpad (optional) | |||
| The admin web-UI should then be available on: `https://dimension.<your-domain>/etherpad/admin` | |||
| If you decided to install [Dimension integration manager](configuring-playbook-dimension.md) alongside Etherpad, the Dimension administrator users can configure the default URL template. | |||
| The Dimension configuration menu can be accessed with the sprocket icon as you begin to add a widget to a room in Element. There you will find the Etherpad Widget Configuration action beneath the _Widgets_ tab. | |||
| ### Managing / Deleting old pads | |||
| If you want to manage and remove old unused pads from Etherpad, you will first need to able Admin access as described above. | |||
| ### Removing the integrated Etherpad chat | |||
| If you wish to disable the Etherpad chat button, you can do it by appending `?showChat=false` to the end of the pad URL, or the template. Examples: | |||
| - `https://etherpad.<your-domain>/p/$roomId_$padName?showChat=false` (for the default - `matrix_etherpad_mode: standalone`) | |||
| - `https://dimension.<your-domain>/etherpad/p/$roomId_$padName?showChat=false` (for `matrix_etherpad_mode: dimension`) | |||
| Then from the plugin manager page (`https://dimension.<your-domain>/etherpad/admin/plugins`), install the `adminpads2` plugin. Once installed, you should have a "Manage pads" section in the Admin web-UI. | |||
| ## Known issues | |||
| ### Known issues | |||
| If your Etherpad widget fails to load, this might be due to Dimension generating a Pad name so long, the Etherpad app rejects it. | |||
| `$roomId_$padName` can end up being longer than 50 characters. You can avoid having this problem by altering the template so it only contains the three word random identifier `$padName`. | |||
| @@ -2,7 +2,7 @@ | |||
| If you've [configured your DNS](configuring-dns.md) and have [configured the playbook](configuring-playbook.md), you can start the installation procedure. | |||
| **Before installing** and each time you update the playbook in the future, you will need to update the Ansible roles in this playbook by running `make roles`. | |||
| **Before installing** and each time you update the playbook in the future, you will need to update the Ansible roles in this playbook by running `make roles`. `make roles` is a shortcut (a `roles` target defined in [`Makefile`](Makefile) and executed by the [`make`](https://www.gnu.org/software/make/) utility) which ultimately runs [ansible-galaxy](https://docs.ansible.com/ansible/latest/cli/ansible-galaxy.html) to download Ansible roles. If you don't have `make`, you can also manually run the `roles` commands seen in the `Makefile`. | |||
| ## Playbook tags introduction | |||
| @@ -22,6 +22,8 @@ If your distro runs within an [LXC container](https://linuxcontainers.org/), you | |||
| - [`git`](https://git-scm.com/) is the recommended way to download the playbook to your computer. `git` may also be required on the server if you will be [self-building](self-building.md) components. | |||
| - [`make`](https://www.gnu.org/software/make/) for running `make roles`, etc. (see [`Makefile`](../Makefile)), although you can also run these commands manually (without `make`) | |||
| - An HTTPS-capable web server at the base domain name (`<your-domain>`) which is capable of serving static files. Unless you decide to [Serve the base domain from the Matrix server](configuring-playbook-base-domain-serving.md) or alternatively, to use DNS SRV records for [Server Delegation](howto-server-delegation.md). | |||
| - Properly configured DNS records for `<your-domain>` (details in [Configuring DNS](configuring-dns.md)). | |||
| @@ -10,6 +10,21 @@ | |||
| # by re-defining it in your own configuration file (`inventory/host_vars/matrix.<your-domain>`). | |||
| ######################################################################## | |||
| # # | |||
| # com.devture.ansible.role.timesync # | |||
| # # | |||
| ######################################################################## | |||
| # To completely disable installing systemd-timesyncd/ntpd, use `devture_timesync_installation_enabled: false`. | |||
| ######################################################################## | |||
| # # | |||
| # /com.devture.ansible.role.timesync # | |||
| # # | |||
| ######################################################################## | |||
| ###################################################################### | |||
| # | |||
| @@ -1511,6 +1526,8 @@ matrix_etherpad_enabled: false | |||
| matrix_etherpad_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9001' }}" | |||
| matrix_etherpad_base_url: "{{ 'https://'+ matrix_server_fqn_dimension + matrix_etherpad_public_endpoint if matrix_etherpad_mode == 'dimension' else 'https://' + matrix_server_fqn_etherpad + '/' }}" | |||
| matrix_etherpad_systemd_required_services_list: | | |||
| {{ | |||
| ['docker.service'] | |||
| @@ -1735,6 +1752,7 @@ matrix_nginx_proxy_proxy_hydrogen_enabled: "{{ matrix_client_hydrogen_enabled }} | |||
| matrix_nginx_proxy_proxy_cinny_enabled: "{{ matrix_client_cinny_enabled }}" | |||
| matrix_nginx_proxy_proxy_buscarron_enabled: "{{ matrix_bot_buscarron_enabled }}" | |||
| matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled }}" | |||
| matrix_nginx_proxy_proxy_etherpad_enabled: "{{ matrix_etherpad_enabled and matrix_etherpad_mode == 'standalone' }}" | |||
| matrix_nginx_proxy_proxy_bot_go_neb_enabled: "{{ matrix_bot_go_neb_enabled }}" | |||
| matrix_nginx_proxy_proxy_jitsi_enabled: "{{ matrix_jitsi_enabled }}" | |||
| matrix_nginx_proxy_proxy_grafana_enabled: "{{ matrix_grafana_enabled }}" | |||
| @@ -1841,7 +1859,7 @@ matrix_nginx_proxy_systemd_wanted_services_list: | | |||
| + | |||
| (['matrix-bot-go-neb.service'] if matrix_bot_go_neb_enabled else []) | |||
| + | |||
| (['matrix-etherpad.service'] if matrix_etherpad_enabled and matrix_dimension_enabled else []) | |||
| (['matrix-etherpad.service'] if matrix_etherpad_enabled else []) | |||
| + | |||
| (['matrix-hookshot.service'] if matrix_hookshot_enabled else []) | |||
| }} | |||
| @@ -1862,6 +1880,8 @@ matrix_ssl_domains_to_obtain_certificates_for: | | |||
| + | |||
| ([matrix_server_fqn_dimension] if matrix_dimension_enabled else []) | |||
| + | |||
| ([matrix_server_fqn_etherpad] if (matrix_etherpad_enabled and matrix_etherpad_mode == 'standalone') else []) | |||
| + | |||
| ([matrix_server_fqn_bot_go_neb] if matrix_bot_go_neb_enabled else []) | |||
| + | |||
| ([matrix_server_fqn_jitsi] if matrix_jitsi_enabled else []) | |||
| @@ -6,8 +6,11 @@ | |||
| - src: git+https://github.com/devture/com.devture.ansible.role.systemd_docker_base.git | |||
| version: 327d2e17f5189ac2480d6012f58cf64a2b46efba | |||
| - src: git+https://github.com/devture/com.devture.ansible.role.timesync.git | |||
| version: 461ace97fcf0e36c76747b36fcad8587d9b072f5 | |||
| - src: git+https://github.com/devture/com.devture.ansible.role.playbook_state_preserver.git | |||
| version: 0857450721d525238ca230c9e6f8f8ad3a248564 | |||
| version: ff2fd42e1c1a9e28e3312bbd725395f9c2fc7f16 | |||
| - src: git+https://github.com/devture/com.devture.ansible.role.playbook_runtime_messages.git | |||
| version: f1c78d4e85e875129790c58335d0e44385683f6b | |||
| @@ -66,8 +66,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_backup_borg_docker_image_force_pull }}" | |||
| when: "not matrix_backup_borg_container_image_self_build | bool" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure borg repository is present on self-build | |||
| @@ -96,14 +96,14 @@ | |||
| - name: Ensure matrix-backup-borg.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-backup-borg.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-backup-borg.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.service" | |||
| mode: 0644 | |||
| register: matrix_backup_borg_systemd_service_result | |||
| - name: Ensure matrix-backup-borg.timer installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-backup-borg.timer.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-backup-borg.timer" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.timer" | |||
| mode: 0644 | |||
| register: matrix_backup_borg_systemd_timer_result | |||
| @@ -1,7 +1,7 @@ | |||
| --- | |||
| - name: Check existence of matrix-backup-borg service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-backup-borg.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.service" | |||
| register: matrix_backup_borg_service_stat | |||
| - name: Ensure matrix-backup-borg is stopped | |||
| @@ -15,13 +15,13 @@ | |||
| - name: Ensure matrix-backup-borg.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-backup-borg.service" | |||
| 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: "{{ matrix_systemd_path }}/matrix-backup-borg.timer" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.timer" | |||
| state: absent | |||
| when: "matrix_backup_borg_service_stat.stat.exists | bool" | |||
| @@ -12,10 +12,10 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=oneshot | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-backup-borg 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-backup-borg 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_docker }} run --rm --name matrix-backup-borg \ | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-backup-borg 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-backup-borg 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-backup-borg \ | |||
| --log-driver=none \ | |||
| --cap-drop=ALL \ | |||
| --read-only \ | |||
| @@ -33,7 +33,7 @@ ExecStartPre=-{{ matrix_host_command_docker }} run --rm --name matrix-backup-bor | |||
| {{ matrix_backup_borg_docker_image }} \ | |||
| sh -c "borgmatic --init --encryption {{ matrix_backup_borg_encryption }}" | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-backup-borg \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-backup-borg \ | |||
| --log-driver=none \ | |||
| --cap-drop=ALL \ | |||
| --read-only \ | |||
| @@ -50,8 +50,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-backup-borg \ | |||
| {% endfor %} | |||
| {{ matrix_backup_borg_docker_image }} | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-backup-borg 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-backup-borg 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-backup-borg 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-backup-borg 2>/dev/null || true' | |||
| SyslogIdentifier=matrix-backup-borg | |||
| [Install] | |||
| @@ -62,6 +62,9 @@ matrix_server_fqn_buscarron: "buscarron.{{ matrix_domain }}" | |||
| # This is where you access the Dimension. | |||
| matrix_server_fqn_dimension: "dimension.{{ matrix_domain }}" | |||
| # This is where you access the etherpad (if enabled via matrix_etherpad_enabled; disabled by default). | |||
| matrix_server_fqn_etherpad: "etherpad.{{ matrix_domain }}" | |||
| # For use with Go-NEB! (github callback url for example) | |||
| matrix_server_fqn_bot_go_neb: "goneb.{{ matrix_domain }}" | |||
| @@ -92,14 +95,6 @@ matrix_debian_arch: "{{ 'armhf' if matrix_architecture == 'arm32' else matrix_ar | |||
| matrix_container_global_registry_prefix: "docker.io/" | |||
| # Each docker pull will retry on failed attempt 10 times with delay of 10 seconds between each attempt. | |||
| matrix_container_retries_count: 10 | |||
| matrix_container_retries_delay: 10 | |||
| # Each get_url will retry on failed attempt 10 times with delay of 10 seconds between each attempt. | |||
| matrix_geturl_retries_count: 10 | |||
| matrix_geturl_retries_delay: 10 | |||
| matrix_user_username: "matrix" | |||
| matrix_user_groupname: "matrix" | |||
| @@ -113,12 +108,6 @@ matrix_base_data_path: "/matrix" | |||
| matrix_base_data_path_mode: "750" | |||
| matrix_static_files_base_path: "{{ matrix_base_data_path }}/static-files" | |||
| matrix_systemd_path: "/etc/systemd/system" | |||
| # Specifies the path to use for the `HOME` environment variable for systemd unit files. | |||
| # Docker 20.10 complains with `WARNING: Error loading config file: .dockercfg: $HOME is not defined` | |||
| # if `$HOME` is not defined, so we define something to make it happy. | |||
| matrix_systemd_unit_home_path: /root | |||
| # This is now unused. We keep it so that cleanup tasks can use it. | |||
| # To be removed in the future. | |||
| @@ -126,16 +115,10 @@ matrix_cron_path: "/etc/cron.d" | |||
| matrix_local_bin_path: "/usr/local/bin" | |||
| matrix_host_command_docker: "/usr/bin/env docker" | |||
| matrix_host_command_sleep: "/usr/bin/env sleep" | |||
| matrix_host_command_chown: "/usr/bin/env chown" | |||
| matrix_host_command_fusermount: "/usr/bin/env fusermount" | |||
| matrix_host_command_openssl: "/usr/bin/env openssl" | |||
| matrix_host_command_systemctl: "/usr/bin/env systemctl" | |||
| matrix_host_command_sh: "/usr/bin/env sh" | |||
| matrix_ntpd_package: "{{ 'systemd-timesyncd' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 7) or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version | int > 18) else ('systemd' if ansible_os_family == 'Suse' else 'ntp') }}" | |||
| matrix_ntpd_service: "{{ 'systemd-timesyncd' if (ansible_os_family == 'RedHat' and ansible_distribution_major_version | int > 7) or (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version | int > 18) or ansible_distribution == 'Archlinux' or ansible_os_family == 'Suse' else ('ntpd' if ansible_os_family == 'RedHat' else 'ntp') }}" | |||
| matrix_homeserver_url: "https://{{ matrix_server_fqn_matrix }}" | |||
| @@ -0,0 +1,12 @@ | |||
| --- | |||
| # This is for both RedHat 7 and 8 | |||
| - ansible.builtin.include_tasks: "{{ role_path }}/tasks/ensure_fuse_installed_redhat.yml" | |||
| when: ansible_os_family == 'RedHat' | |||
| # This is for both Debian and Raspbian | |||
| - ansible.builtin.include_tasks: "{{ role_path }}/tasks/ensure_fuse_installed_debian.yml" | |||
| when: ansible_os_family == 'Debian' | |||
| - ansible.builtin.include_tasks: "{{ role_path }}/tasks/ensure_fuse_installed_archlinux.yml" | |||
| when: ansible_os_family == 'Archlinux' | |||
| @@ -0,0 +1,6 @@ | |||
| --- | |||
| - name: Ensure fuse installed (Archlinux) | |||
| community.general.pacman: | |||
| name: fuse3 | |||
| state: present | |||
| @@ -0,0 +1,6 @@ | |||
| --- | |||
| - name: Ensure fuse installed (Debian/Raspbian) | |||
| ansible.builtin.apt: | |||
| name: fuse | |||
| state: present | |||
| @@ -0,0 +1,6 @@ | |||
| --- | |||
| - name: Ensure fuse installed (RedHat) | |||
| ansible.builtin.yum: | |||
| name: fuse | |||
| state: present | |||
| @@ -0,0 +1,6 @@ | |||
| --- | |||
| - name: Ensure openssl installed | |||
| ansible.builtin.package: | |||
| name: openssl | |||
| state: present | |||
| @@ -39,9 +39,3 @@ | |||
| name: docker | |||
| state: started | |||
| enabled: true | |||
| - name: "Ensure ntpd is started and autoruns" | |||
| ansible.builtin.service: | |||
| name: "{{ matrix_ntpd_service }}" | |||
| state: started | |||
| enabled: true | |||
| @@ -25,13 +25,6 @@ | |||
| update_cache: true | |||
| when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' | |||
| - name: Ensure APT packages are installed | |||
| ansible.builtin.apt: | |||
| name: | |||
| - "{{ matrix_ntpd_package }}" | |||
| state: present | |||
| update_cache: true | |||
| - name: Ensure Docker is installed | |||
| ansible.builtin.apt: | |||
| name: | |||
| @@ -17,13 +17,6 @@ | |||
| key: https://download.docker.com/linux/fedora/gpg | |||
| when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' | |||
| - name: Ensure yum packages are installed | |||
| ansible.builtin.yum: | |||
| name: | |||
| - "{{ matrix_ntpd_package }}" | |||
| state: present | |||
| update_cache: true | |||
| - name: Ensure Docker is installed | |||
| ansible.builtin.yum: | |||
| name: | |||
| @@ -25,13 +25,6 @@ | |||
| update_cache: true | |||
| when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' | |||
| - name: Ensure APT packages are installed | |||
| ansible.builtin.apt: | |||
| name: | |||
| - "{{ matrix_ntpd_package }}" | |||
| state: present | |||
| update_cache: true | |||
| - name: Ensure Docker is installed | |||
| ansible.builtin.apt: | |||
| name: | |||
| @@ -15,13 +15,6 @@ | |||
| key: https://download.docker.com/linux/centos/gpg | |||
| when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' | |||
| - name: Ensure yum packages are installed | |||
| ansible.builtin.yum: | |||
| name: | |||
| - "{{ matrix_ntpd_package }}" | |||
| state: present | |||
| update_cache: true | |||
| - name: Ensure Docker is installed | |||
| ansible.builtin.yum: | |||
| name: | |||
| @@ -22,13 +22,6 @@ | |||
| state: present | |||
| update_cache: true | |||
| - name: Ensure yum packages are installed | |||
| ansible.builtin.yum: | |||
| name: | |||
| - "{{ matrix_ntpd_package }}" | |||
| state: present | |||
| update_cache: true | |||
| - name: Ensure Docker is installed | |||
| ansible.builtin.yum: | |||
| name: | |||
| @@ -1,23 +0,0 @@ | |||
| --- | |||
| # This is for both RedHat 7 and 8 | |||
| - name: Ensure fuse installed (RedHat) | |||
| ansible.builtin.yum: | |||
| name: | |||
| - fuse | |||
| state: present | |||
| when: ansible_os_family == 'RedHat' | |||
| # This is for both Debian and Raspbian | |||
| - name: Ensure fuse installed (Debian/Raspbian) | |||
| ansible.builtin.apt: | |||
| name: | |||
| - fuse | |||
| state: present | |||
| when: ansible_os_family == 'Debian' | |||
| - name: Ensure fuse installed (Archlinux) | |||
| community.general.pacman: | |||
| name: | |||
| - fuse3 | |||
| state: present | |||
| when: ansible_distribution == 'Archlinux' | |||
| @@ -1,23 +0,0 @@ | |||
| --- | |||
| # This is for both RedHat 7 and 8 | |||
| - name: Ensure openssl installed (RedHat) | |||
| ansible.builtin.yum: | |||
| name: | |||
| - openssl | |||
| state: present | |||
| when: ansible_os_family == 'RedHat' | |||
| # This is for both Debian and Raspbian | |||
| - name: Ensure openssl installed (Debian/Raspbian) | |||
| ansible.builtin.apt: | |||
| name: | |||
| - openssl | |||
| state: present | |||
| when: ansible_os_family == 'Debian' | |||
| - name: Ensure openssl installed (Archlinux) | |||
| community.general.pacman: | |||
| name: | |||
| - openssl | |||
| state: present | |||
| when: ansible_distribution == 'Archlinux' | |||
| @@ -16,9 +16,9 @@ if [ "$sure" != "Yes, I really want to remove everything!" ]; then | |||
| else | |||
| echo "Stop and remove matrix services" | |||
| for s in $(find {{ matrix_systemd_path }}/ -type f -name "matrix-*" -printf "%f\n"); do | |||
| for s in $(find {{ devture_systemd_docker_base_systemd_path }}/ -type f -name "matrix-*" -printf "%f\n"); do | |||
| systemctl disable --now $s | |||
| rm -f {{ matrix_systemd_path }}/$s | |||
| rm -f {{ devture_systemd_docker_base_systemd_path }}/$s | |||
| done | |||
| systemctl daemon-reload | |||
| @@ -57,8 +57,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_buscarron_docker_image_force_pull }}" | |||
| when: "not matrix_bot_buscarron_container_image_self_build | bool" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure buscarron repository is present on self-build | |||
| @@ -87,7 +87,7 @@ | |||
| - name: Ensure matrix-bot-buscarron.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-bot-buscarron.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-bot-buscarron.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service" | |||
| mode: 0644 | |||
| register: matrix_bot_buscarron_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-buscarron service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-buscarron.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service" | |||
| register: matrix_bot_buscarron_service_stat | |||
| - name: Ensure matrix-buscarron is stopped | |||
| @@ -16,7 +16,7 @@ | |||
| - name: Ensure matrix-bot-buscarron.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-buscarron.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service" | |||
| state: absent | |||
| when: "matrix_bot_buscarron_service_stat.stat.exists | bool" | |||
| @@ -12,11 +12,11 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-buscarron 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-buscarron 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-buscarron 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-buscarron 2>/dev/null || true' | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-buscarron \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-bot-buscarron \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -29,8 +29,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-buscarron | |||
| {% endfor %} | |||
| {{ matrix_bot_buscarron_docker_image }} | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-buscarron 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-buscarron 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-buscarron 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-buscarron 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-bot-buscarron | |||
| @@ -23,8 +23,8 @@ | |||
| force_source: "{{ matrix_bot_go_neb_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_go_neb_docker_image_force_pull }}" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure go-neb config installed | |||
| @@ -38,7 +38,7 @@ | |||
| - name: Ensure matrix-bot-go-neb.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-bot-go-neb.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-bot-go-neb.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-go-neb.service" | |||
| mode: 0644 | |||
| register: matrix_bot_go_neb_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-go-neb service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-go-neb.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-go-neb.service" | |||
| register: matrix_bot_go_neb_service_stat | |||
| - name: Ensure matrix-go-neb is stopped | |||
| @@ -16,7 +16,7 @@ | |||
| - name: Ensure matrix-bot-go-neb.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-go-neb.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-go-neb.service" | |||
| state: absent | |||
| when: "matrix_bot_go_neb_service_stat.stat.exists | bool" | |||
| @@ -12,11 +12,11 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-go-neb 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-go-neb 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-go-neb 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-go-neb 2>/dev/null || true' | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-go-neb \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-bot-go-neb \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -39,8 +39,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-go-neb \ | |||
| {{ matrix_bot_go_neb_docker_image }} \ | |||
| -c "go-neb /config/config.yaml" | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-go-neb 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-go-neb 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-go-neb 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-go-neb 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-bot-go-neb | |||
| @@ -57,8 +57,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_honoroit_docker_image_force_pull }}" | |||
| when: "not matrix_bot_honoroit_container_image_self_build | bool" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure honoroit repository is present on self-build | |||
| @@ -87,7 +87,7 @@ | |||
| - name: Ensure matrix-bot-honoroit.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-bot-honoroit.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-bot-honoroit.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-honoroit.service" | |||
| mode: 0644 | |||
| register: matrix_bot_honoroit_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-honoroit service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-honoroit.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-honoroit.service" | |||
| register: matrix_bot_honoroit_service_stat | |||
| - name: Ensure matrix-honoroit is stopped | |||
| @@ -16,7 +16,7 @@ | |||
| - name: Ensure matrix-bot-honoroit.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-honoroit.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-honoroit.service" | |||
| state: absent | |||
| when: "matrix_bot_honoroit_service_stat.stat.exists | bool" | |||
| @@ -12,11 +12,11 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-honoroit 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-honoroit 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-honoroit 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-honoroit 2>/dev/null || true' | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-honoroit \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-bot-honoroit \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -29,8 +29,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-honoroit \ | |||
| {% endfor %} | |||
| {{ matrix_bot_honoroit_docker_image }} | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-honoroit 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-honoroit 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-honoroit 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-honoroit 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-bot-honoroit | |||
| @@ -29,8 +29,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_matrix_registration_bot_docker_image_force_pull }}" | |||
| when: "not matrix_bot_matrix_registration_bot_container_image_self_build | bool" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure matrix-registration-bot repository is present on self-build | |||
| @@ -59,7 +59,7 @@ | |||
| - name: Ensure matrix-bot-matrix-registration-bot.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-bot-matrix-registration-bot.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-bot-matrix-registration-bot.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service" | |||
| mode: 0644 | |||
| register: matrix_bot_matrix_registration_bot_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-matrix-registration-bot service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-matrix-registration-bot.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service" | |||
| register: matrix_bot_matrix_registration_bot_service_stat | |||
| - name: Ensure matrix-matrix-registration-bot is stopped | |||
| @@ -16,7 +16,7 @@ | |||
| - name: Ensure matrix-bot-matrix-registration-bot.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-matrix-registration-bot.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-registration-bot.service" | |||
| state: absent | |||
| when: "matrix_bot_matrix_registration_bot_service_stat.stat.exists | bool" | |||
| @@ -12,11 +12,11 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-matrix-registration-bot 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-matrix-registration-bot 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-matrix-registration-bot 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-matrix-registration-bot 2>/dev/null || true' | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-matrix-registration-bot \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-bot-matrix-registration-bot \ | |||
| --log-driver=none \ | |||
| --cap-drop=ALL \ | |||
| -e "CONFIG_PATH=/config/config.yml" \ | |||
| @@ -27,8 +27,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-matrix-reg | |||
| --network={{ matrix_docker_network }} \ | |||
| {{ matrix_bot_matrix_registration_bot_docker_image }} | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-matrix-registration-bot 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-matrix-registration-bot 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-matrix-registration-bot 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-matrix-registration-bot 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-bot-matrix-registration-bot | |||
| @@ -50,8 +50,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_matrix_reminder_bot_docker_image_force_pull }}" | |||
| when: "not matrix_bot_matrix_reminder_bot_container_image_self_build | bool" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure matrix-reminder-bot repository is present on self-build | |||
| @@ -88,7 +88,7 @@ | |||
| - name: Ensure matrix-bot-matrix-reminder-bot.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-bot-matrix-reminder-bot.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-bot-matrix-reminder-bot.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-reminder-bot.service" | |||
| mode: 0644 | |||
| register: matrix_bot_matrix_reminder_bot_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-matrix-reminder-bot service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-matrix-reminder-bot.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-reminder-bot.service" | |||
| register: matrix_bot_matrix_reminder_bot_service_stat | |||
| - name: Ensure matrix-matrix-reminder-bot is stopped | |||
| @@ -16,7 +16,7 @@ | |||
| - name: Ensure matrix-bot-matrix-reminder-bot.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-matrix-reminder-bot.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-matrix-reminder-bot.service" | |||
| state: absent | |||
| when: "matrix_bot_matrix_reminder_bot_service_stat.stat.exists | bool" | |||
| @@ -12,11 +12,11 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-matrix-reminder-bot 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-matrix-reminder-bot 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-matrix-reminder-bot 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-matrix-reminder-bot 2>/dev/null || true' | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-matrix-reminder-bot \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-bot-matrix-reminder-bot \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -32,8 +32,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-matrix-rem | |||
| {{ matrix_bot_matrix_reminder_bot_docker_image }} \ | |||
| -c "matrix-reminder-bot /config/config.yaml" | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-matrix-reminder-bot 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-matrix-reminder-bot 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-matrix-reminder-bot 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-matrix-reminder-bot 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-bot-matrix-reminder-bot | |||
| @@ -33,8 +33,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_maubot_docker_image_force_pull }}" | |||
| when: "not matrix_bot_maubot_container_image_self_build|bool" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure maubot repository is present on self-build | |||
| @@ -63,7 +63,7 @@ | |||
| - name: Ensure matrix-bot-maubot.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-bot-maubot.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-bot-maubot.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-maubot.service" | |||
| mode: 0644 | |||
| register: matrix_bot_maubot_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-maubot service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-maubot.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-maubot.service" | |||
| register: matrix_bot_maubot_service_stat | |||
| - name: Ensure matrix-bot-maubot is stopped | |||
| @@ -16,7 +16,7 @@ | |||
| - name: Ensure matrix-bot-maubot.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-maubot.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-maubot.service" | |||
| state: absent | |||
| when: "matrix_bot_maubot_service_stat.stat.exists | bool" | |||
| @@ -12,11 +12,11 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-maubot 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-maubot 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-maubot 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-maubot 2>/dev/null || true' | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-maubot \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-bot-maubot \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --read-only \ | |||
| @@ -33,8 +33,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-maubot \ | |||
| {{ matrix_bot_maubot_docker_image }} \ | |||
| python3 -m maubot -c /config/config.yaml --no-update | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-maubot 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-maubot 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-maubot 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-maubot 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-bot-maubot | |||
| @@ -25,8 +25,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_mjolnir_docker_image_force_pull }}" | |||
| when: "not matrix_bot_mjolnir_container_image_self_build | bool" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure mjolnir repository is present on self-build | |||
| @@ -62,7 +62,7 @@ | |||
| - name: Ensure matrix-bot-mjolnir.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-bot-mjolnir.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-bot-mjolnir.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-mjolnir.service" | |||
| mode: 0644 | |||
| register: matrix_bot_mjolnir_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-bot-mjolnir service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-mjolnir.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-mjolnir.service" | |||
| register: matrix_bot_mjolnir_service_stat | |||
| - name: Ensure matrix-bot-mjolnir is stopped | |||
| @@ -16,7 +16,7 @@ | |||
| - name: Ensure matrix-bot-mjolnir.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-mjolnir.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-mjolnir.service" | |||
| state: absent | |||
| when: "matrix_bot_mjolnir_service_stat.stat.exists | bool" | |||
| @@ -12,14 +12,14 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-mjolnir 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-mjolnir 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-mjolnir 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-mjolnir 2>/dev/null || true' | |||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-mjolnir \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-bot-mjolnir \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -32,8 +32,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-mjolnir \ | |||
| {% endfor %} | |||
| {{ matrix_bot_mjolnir_docker_image }} | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-mjolnir 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-mjolnir 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-mjolnir 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-mjolnir 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-bot-mjolnir | |||
| @@ -53,8 +53,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_postmoogle_docker_image_force_pull }}" | |||
| when: "not matrix_bot_postmoogle_container_image_self_build | bool" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure postmoogle repository is present on self-build | |||
| @@ -83,7 +83,7 @@ | |||
| - name: Ensure matrix-bot-postmoogle.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-bot-postmoogle.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-bot-postmoogle.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service" | |||
| mode: 0644 | |||
| register: matrix_bot_postmoogle_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-postmoogle service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-postmoogle.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service" | |||
| register: matrix_bot_postmoogle_service_stat | |||
| - name: Ensure matrix-postmoogle is stopped | |||
| @@ -16,7 +16,7 @@ | |||
| - name: Ensure matrix-bot-postmoogle.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-bot-postmoogle.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service" | |||
| state: absent | |||
| when: "matrix_bot_postmoogle_service_stat.stat.exists | bool" | |||
| @@ -12,11 +12,11 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-postmoogle 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-postmoogle 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true' | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-postmoogle \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-bot-postmoogle \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -36,8 +36,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-postmoogle | |||
| {% endfor %} | |||
| {{ matrix_bot_postmoogle_docker_image }} | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-bot-postmoogle 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-bot-postmoogle 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-postmoogle 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-bot-postmoogle | |||
| @@ -35,8 +35,8 @@ | |||
| force_source: "{{ matrix_appservice_discord_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_discord_docker_image_force_pull }}" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure AppService Discord paths exist | |||
| @@ -93,7 +93,7 @@ | |||
| # We intentionally suppress Ansible changes. | |||
| - name: Generate AppService Discord invite link | |||
| ansible.builtin.shell: >- | |||
| {{ matrix_host_command_docker }} run --rm --name matrix-appservice-discord-link-gen | |||
| {{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-appservice-discord-link-gen | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} | |||
| --cap-drop=ALL | |||
| --mount type=bind,src={{ matrix_appservice_discord_config_path }},dst=/cfg | |||
| @@ -105,7 +105,7 @@ | |||
| - name: Ensure matrix-appservice-discord.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-appservice-discord.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-appservice-discord.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-discord.service" | |||
| mode: 0644 | |||
| register: matrix_appservice_discord_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-appservice-discord service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-appservice-discord.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-discord.service" | |||
| register: matrix_appservice_discord_service_stat | |||
| - name: Ensure matrix-appservice-discord is stopped | |||
| @@ -15,7 +15,7 @@ | |||
| - name: Ensure matrix-appservice-discord.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-appservice-discord.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-discord.service" | |||
| state: absent | |||
| when: "matrix_appservice_discord_service_stat.stat.exists" | |||
| @@ -12,14 +12,14 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-discord 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-discord 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-appservice-discord 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-discord 2>/dev/null || true' | |||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-discord \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-appservice-discord \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -35,8 +35,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-dis | |||
| {{ matrix_appservice_discord_docker_image }} \ | |||
| node /build/src/discordas.js -p 9005 -c /cfg/config.yaml -f /cfg/registration.yaml | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-discord 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-discord 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-appservice-discord 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-discord 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-appservice-discord | |||
| @@ -30,7 +30,7 @@ | |||
| - name: Check existence of matrix-appservice-irc service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-appservice-irc.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service" | |||
| register: matrix_appservice_irc_service_stat | |||
| - name: Ensure matrix-appservice-irc is stopped | |||
| @@ -42,7 +42,7 @@ | |||
| - name: Import appservice-irc NeDB database into Postgres | |||
| ansible.builtin.command: | |||
| cmd: >- | |||
| {{ matrix_host_command_docker }} run | |||
| {{ devture_systemd_docker_base_host_command_docker }} run | |||
| --rm | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} | |||
| --cap-drop=ALL | |||
| @@ -66,9 +66,9 @@ | |||
| - name: Inject result | |||
| ansible.builtin.set_fact: | |||
| matrix_playbook_runtime_results: | | |||
| devture_playbook_runtime_messages_list: | | |||
| {{ | |||
| matrix_playbook_runtime_results | default([]) | |||
| devture_playbook_runtime_messages_list | default([]) | |||
| + | |||
| [ | |||
| "NOTE: Your appservice-irc database files have been imported into Postgres. The original database files have been moved from `{{ matrix_appservice_irc_data_path }}/*.db` to `{{ matrix_appservice_irc_data_path }}/*.db.backup`. When you've confirmed that the import went well and everything works, you should be able to safely delete these files." | |||
| @@ -1,6 +1,8 @@ | |||
| --- | |||
| - ansible.builtin.import_tasks: "{{ role_path }}/../matrix-base/tasks/util/ensure_openssl_installed.yml" | |||
| - ansible.builtin.import_role: | |||
| name: custom/matrix-base | |||
| tasks_from: ensure_openssl_installed | |||
| - name: Ensure Appservice IRC paths exist | |||
| ansible.builtin.file: | |||
| @@ -71,8 +73,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_irc_docker_image_force_pull }}" | |||
| when: "matrix_appservice_irc_enabled | bool and not matrix_appservice_irc_container_image_self_build | bool" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure matrix-appservice-irc repository is present when self-building | |||
| @@ -147,7 +149,7 @@ | |||
| # to produce a final registration.yaml file, as we desire. | |||
| - name: Generate Appservice IRC registration-template.yaml | |||
| ansible.builtin.shell: >- | |||
| {{ matrix_host_command_docker }} run --rm --name matrix-appservice-irc-gen | |||
| {{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-appservice-irc-gen | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} | |||
| --cap-drop=ALL | |||
| -v {{ matrix_appservice_irc_config_path }}:/config:z | |||
| @@ -193,7 +195,7 @@ | |||
| - name: Ensure matrix-appservice-irc.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-appservice-irc.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-appservice-irc.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service" | |||
| mode: 0644 | |||
| register: matrix_appservice_irc_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-appservice-irc service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-appservice-irc.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service" | |||
| register: matrix_appservice_irc_service_stat | |||
| - name: Ensure matrix-appservice-irc is stopped | |||
| @@ -15,7 +15,7 @@ | |||
| - name: Ensure matrix-appservice-irc.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-appservice-irc.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service" | |||
| state: absent | |||
| when: "matrix_appservice_irc_service_stat.stat.exists" | |||
| @@ -12,14 +12,14 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-irc 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-irc 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-appservice-irc 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-irc 2>/dev/null || true' | |||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-irc \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-appservice-irc \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -36,8 +36,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-irc | |||
| {{ matrix_appservice_irc_docker_image }} \ | |||
| -c 'node app.js -c /config/config.yaml -f /config/registration.yaml -p 9999' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-irc 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-irc 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-appservice-irc 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-irc 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-appservice-irc | |||
| @@ -16,8 +16,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_kakaotalk_docker_image_force_pull }}" | |||
| when: not matrix_appservice_kakaotalk_container_image_self_build | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure matrix-appservice-kakaotalk-node image is pulled | |||
| @@ -28,8 +28,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_kakaotalk_node_docker_image_force_pull }}" | |||
| when: not matrix_appservice_kakaotalk_container_image_self_build | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure matrix-appservice-kakaotalk paths exist | |||
| @@ -108,14 +108,14 @@ | |||
| - name: Ensure matrix-appservice-kakaotalk-node.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-appservice-kakaotalk-node.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-appservice-kakaotalk-node.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk-node.service" | |||
| mode: 0644 | |||
| register: matrix_appservice_kakaotalk_node_systemd_service_result | |||
| - name: Ensure matrix-appservice-kakaotalk.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-appservice-kakaotalk.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-appservice-kakaotalk.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk.service" | |||
| mode: 0644 | |||
| register: matrix_appservice_kakaotalk_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-appservice-kakaotalk service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-appservice-kakaotalk.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk.service" | |||
| register: matrix_appservice_kakaotalk_service_stat | |||
| - name: Ensure matrix-appservice-kakaotalk is stopped | |||
| @@ -15,7 +15,7 @@ | |||
| - name: Check existence of matrix-appservice-kakaotalk-node service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-appservice-kakaotalk-node.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk-node.service" | |||
| register: matrix_appservice_kakaotalk_node_service_stat | |||
| - name: Ensure matrix-appservice-kakaotalk-node is stopped | |||
| @@ -31,8 +31,8 @@ | |||
| path: "{{ item }}" | |||
| state: absent | |||
| with_items: | |||
| - "{{ matrix_systemd_path }}/matrix-appservice-kakaotalk-node.service" | |||
| - "{{ matrix_systemd_path }}/matrix-appservice-kakaotalk.service" | |||
| - "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk-node.service" | |||
| - "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk.service" | |||
| when: "matrix_appservice_kakaotalk_service_stat.stat.exists" | |||
| - name: Ensure systemd reloaded after matrix-appservice-kakaotalk service files removal | |||
| @@ -12,11 +12,11 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-kakaotalk-node 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-kakaotalk-node 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-appservice-kakaotalk-node 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-kakaotalk-node 2>/dev/null || true' | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-kakaotalk-node \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-appservice-kakaotalk-node \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -28,8 +28,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-kak | |||
| {{ matrix_appservice_kakaotalk_node_docker_image }} \ | |||
| node src/main.js --config /config.json | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-kakaotalk-node 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-kakaotalk-node 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-appservice-kakaotalk-node 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-kakaotalk-node 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-appservice-kakaotalk-node | |||
| @@ -12,14 +12,14 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-kakaotalk 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-kakaotalk 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-appservice-kakaotalk 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-kakaotalk 2>/dev/null || true' | |||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-kakaotalk \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-appservice-kakaotalk \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -32,8 +32,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-kak | |||
| {{ matrix_appservice_kakaotalk_docker_image }} \ | |||
| python3 -m matrix_appservice_kakaotalk -c /config/config.yaml --no-update | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-kakaotalk 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-kakaotalk 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-appservice-kakaotalk 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-kakaotalk 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-appservice-kakaotalk | |||
| @@ -36,7 +36,7 @@ | |||
| - name: Import appservice-slack NeDB database into Postgres | |||
| ansible.builtin.command: | |||
| cmd: >- | |||
| {{ matrix_host_command_docker }} run | |||
| {{ devture_systemd_docker_base_host_command_docker }} run | |||
| --rm | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} | |||
| --cap-drop=ALL | |||
| @@ -62,9 +62,9 @@ | |||
| - name: Inject result | |||
| ansible.builtin.set_fact: | |||
| matrix_playbook_runtime_results: | | |||
| devture_playbook_runtime_messages_list: | | |||
| {{ | |||
| matrix_playbook_runtime_results | default([]) | |||
| devture_playbook_runtime_messages_list | default([]) | |||
| + | |||
| [ | |||
| "NOTE: Your appservice-slack database files have been imported into Postgres. The original database files have been moved from `{{ matrix_appservice_slack_data_path }}/*.db` to `{{ matrix_appservice_slack_data_path }}/*.db.backup`. When you've confirmed that the import went well and everything works, you should be able to safely delete these files." | |||
| @@ -39,8 +39,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_slack_docker_image_force_pull }}" | |||
| when: "not matrix_appservice_slack_container_image_self_build | bool" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure matrix-appservice-slack repository is present when self-building | |||
| @@ -85,7 +85,7 @@ | |||
| - name: Ensure matrix-appservice-slack.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-appservice-slack.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-appservice-slack.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-slack.service" | |||
| mode: 0644 | |||
| register: matrix_appservice_slack_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-appservice-slack service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-appservice-slack.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-slack.service" | |||
| register: matrix_appservice_slack_service_stat | |||
| - name: Ensure matrix-appservice-slack is stopped | |||
| @@ -15,7 +15,7 @@ | |||
| - name: Ensure matrix-appservice-slack.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-appservice-slack.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-slack.service" | |||
| state: absent | |||
| when: "matrix_appservice_slack_service_stat.stat.exists" | |||
| @@ -12,14 +12,14 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-slack 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-slack 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-appservice-slack 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-slack 2>/dev/null || true' | |||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-slack \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-appservice-slack \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -35,8 +35,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-sla | |||
| {{ matrix_appservice_slack_docker_image }} \ | |||
| node app.js -p {{matrix_appservice_slack_matrix_port}} -c /config/config.yaml -f /config/slack-registration.yaml | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-slack 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-slack 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-appservice-slack 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-slack 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-appservice-slack | |||
| @@ -22,8 +22,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_webhooks_docker_image_force_pull }}" | |||
| when: "not matrix_appservice_webhooks_container_image_self_build | bool" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - when: "matrix_appservice_webhooks_container_image_self_build | bool" | |||
| @@ -84,7 +84,7 @@ | |||
| - name: Ensure matrix-appservice-webhooks.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-appservice-webhooks.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-appservice-webhooks.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-webhooks.service" | |||
| mode: 0644 | |||
| register: matrix_appservice_webhooks_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-appservice-webhooks service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-appservice-webhooks.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-webhooks.service" | |||
| register: matrix_appservice_webhooks_service_stat | |||
| - name: Ensure matrix-appservice-webhooks is stopped | |||
| @@ -15,7 +15,7 @@ | |||
| - name: Ensure matrix-appservice-webhooks.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-appservice-webhooks.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-webhooks.service" | |||
| state: absent | |||
| when: "matrix_appservice_webhooks_service_stat.stat.exists" | |||
| @@ -12,14 +12,14 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-webhooks 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-webhooks 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-appservice-webhooks 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-webhooks 2>/dev/null || true' | |||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-webhooks \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-appservice-webhooks \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -35,8 +35,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-web | |||
| {{ matrix_appservice_webhooks_docker_image }} \ | |||
| node index.js -p {{ matrix_appservice_webhooks_matrix_port }} -c /config/config.yaml -f /config/webhooks-registration.yaml | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-appservice-webhooks 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-appservice-webhooks 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-appservice-webhooks 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-appservice-webhooks 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-appservice-webhooks | |||
| @@ -30,8 +30,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_beeper_linkedin_docker_image_force_pull }}" | |||
| when: "not matrix_beeper_linkedin_container_image_self_build | bool" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - when: "matrix_beeper_linkedin_container_image_self_build | bool" | |||
| @@ -51,7 +51,7 @@ | |||
| - name: Ensure docker-requirements.txt is generated before building Beeper LinkedIn Docker Image | |||
| ansible.builtin.command: | |||
| cmd: | | |||
| {{ matrix_host_command_docker }} run | |||
| {{ devture_systemd_docker_base_host_command_docker }} run | |||
| --rm | |||
| --entrypoint=/bin/sh | |||
| --mount type=bind,src={{ matrix_beeper_linkedin_docker_src_files_path }},dst=/work | |||
| @@ -93,7 +93,7 @@ | |||
| - name: Ensure matrix-beeper-linkedin.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-beeper-linkedin.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-beeper-linkedin.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-beeper-linkedin.service" | |||
| mode: 0644 | |||
| register: matrix_beeper_linkedin_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-beeper-linkedin service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-beeper-linkedin.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-beeper-linkedin.service" | |||
| register: matrix_beeper_linkedin_service_stat | |||
| - name: Ensure matrix-beeper-linkedin is stopped | |||
| @@ -15,7 +15,7 @@ | |||
| - name: Ensure matrix-beeper-linkedin.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-beeper-linkedin.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-beeper-linkedin.service" | |||
| state: absent | |||
| when: "matrix_beeper_linkedin_service_stat.stat.exists" | |||
| @@ -12,14 +12,14 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-beeper-linkedin 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-beeper-linkedin 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-beeper-linkedin 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-beeper-linkedin 2>/dev/null || true' | |||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-beeper-linkedin \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-beeper-linkedin \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -32,8 +32,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-beeper-linkedi | |||
| {{ matrix_beeper_linkedin_docker_image }} \ | |||
| python3 -m linkedin_matrix -c /data/config.yaml -r /data/registration.yaml | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-beeper-linkedin 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-beeper-linkedin 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-beeper-linkedin 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-beeper-linkedin 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-beeper-linkedin | |||
| @@ -59,8 +59,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_go_skype_bridge_docker_image_force_pull }}" | |||
| when: not matrix_go_skype_bridge_container_image_self_build | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure Go Skype Bridge repository is present on self-build | |||
| @@ -132,7 +132,7 @@ | |||
| - name: Ensure matrix-go-skype-bridge.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-go-skype-bridge.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-go-skype-bridge.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-go-skype-bridge.service" | |||
| mode: 0644 | |||
| register: matrix_go_skype_bridge_systemd_service_result | |||
| @@ -12,14 +12,14 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-go-skype-bridge 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-go-skype-bridge 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-go-skype-bridge 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-go-skype-bridge 2>/dev/null || true' | |||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-go-skype-bridge \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-go-skype-bridge \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -33,8 +33,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-go-skype-bridg | |||
| {{ matrix_go_skype_bridge_docker_image }} \ | |||
| /usr/bin/matrix-skype -c /config/config.yaml -r /config/registration.yaml | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-go-skype-bridge 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-go-skype-bridge 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-go-skype-bridge 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-go-skype-bridge 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-go-skype-bridge | |||
| @@ -7,8 +7,8 @@ | |||
| force_source: "{{ matrix_heisenbridge_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_heisenbridge_docker_image_force_pull }}" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure heisenbridge paths exist | |||
| @@ -32,7 +32,7 @@ | |||
| - name: Ensure matrix-heisenbridge.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-heisenbridge.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-heisenbridge.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-heisenbridge.service" | |||
| mode: 0644 | |||
| register: matrix_heisenbridge_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-heisenbridge service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-heisenbridge.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-heisenbridge.service" | |||
| register: matrix_heisenbridge_service_stat | |||
| - name: Ensure matrix-heisenbridge is stopped | |||
| @@ -15,7 +15,7 @@ | |||
| - name: Ensure matrix-heisenbridge.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-heisenbridge.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-heisenbridge.service" | |||
| state: absent | |||
| when: "matrix_heisenbridge_service_stat.stat.exists" | |||
| @@ -12,11 +12,11 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_docker }} kill matrix-heisenbridge | |||
| ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-heisenbridge | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_docker }} kill matrix-heisenbridge | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_docker }} rm matrix-heisenbridge | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-heisenbridge \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-heisenbridge \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -41,8 +41,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-heisenbridge \ | |||
| --listen-port 9898 \ | |||
| {{ matrix_heisenbridge_homeserver_url }} | |||
| ExecStop=-{{ matrix_host_command_docker }} kill matrix-heisenbridge | |||
| ExecStop=-{{ matrix_host_command_docker }} rm matrix-heisenbridge | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_docker }} kill matrix-heisenbridge | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_docker }} rm matrix-heisenbridge | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-heisenbridge | |||
| @@ -1,6 +1,8 @@ | |||
| --- | |||
| - ansible.builtin.import_tasks: "{{ role_path }}/../matrix-base/tasks/util/ensure_openssl_installed.yml" | |||
| - ansible.builtin.import_role: | |||
| name: custom/matrix-base | |||
| tasks_from: ensure_openssl_installed | |||
| - name: Ensure hookshot paths exist | |||
| ansible.builtin.file: | |||
| @@ -22,8 +24,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_hookshot_docker_image_force_pull }}" | |||
| when: not matrix_hookshot_container_image_self_build | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure hookshot repository is present on self-build | |||
| @@ -71,7 +73,7 @@ | |||
| - name: Validate hookshot config.yml | |||
| ansible.builtin.command: | |||
| cmd: | | |||
| {{ matrix_host_command_docker }} run | |||
| {{ devture_systemd_docker_base_host_command_docker }} run | |||
| --rm | |||
| --name={{ matrix_hookshot_container_url }}-validate | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} | |||
| @@ -106,7 +108,7 @@ | |||
| - name: Ensure matrix-hookshot.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-hookshot.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-hookshot.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-hookshot.service" | |||
| mode: 0644 | |||
| register: matrix_hookshot_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-hookshot service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-hookshot.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-hookshot.service" | |||
| register: matrix_hookshot_service_stat | |||
| - name: Ensure matrix-hookshot is stopped | |||
| @@ -15,7 +15,7 @@ | |||
| - name: Ensure matrix-hookshot.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-hookshot.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-hookshot.service" | |||
| state: absent | |||
| when: "matrix_hookshot_service_stat.stat.exists" | |||
| @@ -12,11 +12,11 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_docker }} kill {{ matrix_hookshot_container_url }} | |||
| ExecStartPre=-{{ matrix_host_command_docker }} rm {{ matrix_hookshot_container_url }} | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_docker }} kill {{ matrix_hookshot_container_url }} | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_docker }} rm {{ matrix_hookshot_container_url }} | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name {{ matrix_hookshot_container_url }} \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name {{ matrix_hookshot_container_url }} \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -30,8 +30,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name {{ matrix_hookshot_co | |||
| {% endfor %} | |||
| {{ matrix_hookshot_docker_image }} | |||
| ExecStop=-{{ matrix_host_command_docker }} kill {{ matrix_hookshot_container_url }} | |||
| ExecStop=-{{ matrix_host_command_docker }} rm {{ matrix_hookshot_container_url }} | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_docker }} kill {{ matrix_hookshot_container_url }} | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_docker }} rm {{ matrix_hookshot_container_url }} | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier={{ matrix_hookshot_container_url }} | |||
| @@ -59,8 +59,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_discord_docker_image_force_pull }}" | |||
| when: not matrix_mautrix_discord_container_image_self_build | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure Mautrix discord repository is present on self-build | |||
| @@ -105,7 +105,7 @@ | |||
| - name: Ensure matrix-mautrix-discord.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-mautrix-discord.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-mautrix-discord.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-discord.service" | |||
| mode: 0644 | |||
| register: matrix_mautrix_discord_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-mautrix-discord service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-discord.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-discord.service" | |||
| register: matrix_mautrix_discord_service_stat | |||
| - name: Ensure matrix-mautrix-discord is stopped | |||
| @@ -15,7 +15,7 @@ | |||
| - name: Ensure matrix-mautrix-discord.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-discord.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-discord.service" | |||
| state: absent | |||
| when: "matrix_mautrix_discord_service_stat.stat.exists" | |||
| @@ -12,14 +12,14 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-discord 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-discord 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-discord 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-discord 2>/dev/null || true' | |||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-discord \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-mautrix-discord \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -33,8 +33,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-discor | |||
| {{ matrix_mautrix_discord_docker_image }} \ | |||
| /usr/bin/mautrix-discord -c /config/config.yaml -r /config/registration.yaml --no-update | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-discord 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-discord 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-discord 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-discord 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-mautrix-discord | |||
| @@ -44,8 +44,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_facebook_docker_image_force_pull }}" | |||
| when: not matrix_mautrix_facebook_container_image_self_build | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure Mautrix Facebook paths exist | |||
| @@ -122,7 +122,7 @@ | |||
| - name: Ensure matrix-mautrix-facebook.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-mautrix-facebook.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-mautrix-facebook.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-facebook.service" | |||
| mode: 0644 | |||
| register: matrix_mautrix_facebook_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-mautrix-facebook service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-facebook.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-facebook.service" | |||
| register: matrix_mautrix_facebook_service_stat | |||
| - name: Ensure matrix-mautrix-facebook is stopped | |||
| @@ -15,7 +15,7 @@ | |||
| - name: Ensure matrix-mautrix-facebook.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-facebook.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-facebook.service" | |||
| state: absent | |||
| when: "matrix_mautrix_facebook_service_stat.stat.exists" | |||
| @@ -14,9 +14,9 @@ | |||
| block: | |||
| - name: Inject warning if on an old SQLite-supporting version | |||
| ansible.builtin.set_fact: | |||
| matrix_playbook_runtime_results: | | |||
| devture_playbook_runtime_messages_list: | | |||
| {{ | |||
| matrix_playbook_runtime_results | default([]) | |||
| devture_playbook_runtime_messages_list | default([]) | |||
| + | |||
| [ | |||
| "NOTE: Your mautrix-facebook bridge is still on SQLite and on the last version that supported it, before support was dropped. Support has been subsequently re-added in v0.3.2, so we advise you to upgrade (by removing your `matrix_mautrix_facebook_docker_image` definition from vars.yml)" | |||
| @@ -12,14 +12,14 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-facebook 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-facebook 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-facebook 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-facebook 2>/dev/null || true' | |||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-facebook \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-mautrix-facebook \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -35,8 +35,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-facebo | |||
| {{ matrix_mautrix_facebook_docker_image }} \ | |||
| python3 -m mautrix_facebook -c /config/config.yaml --no-update | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-facebook 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-facebook 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-facebook 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-facebook 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-mautrix-facebook | |||
| @@ -44,8 +44,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_googlechat_docker_image_force_pull }}" | |||
| when: not matrix_mautrix_googlechat_container_image_self_build | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure Mautrix googlechat paths exist | |||
| @@ -122,7 +122,7 @@ | |||
| - name: Ensure matrix-mautrix-googlechat.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-mautrix-googlechat.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-mautrix-googlechat.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-googlechat.service" | |||
| mode: 0644 | |||
| register: matrix_mautrix_googlechat_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-mautrix-googlechat service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-googlechat.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-googlechat.service" | |||
| register: matrix_mautrix_googlechat_service_stat | |||
| - name: Ensure matrix-mautrix-googlechat is stopped | |||
| @@ -15,7 +15,7 @@ | |||
| - name: Ensure matrix-mautrix-googlechat.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-googlechat.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-googlechat.service" | |||
| state: absent | |||
| when: "matrix_mautrix_googlechat_service_stat.stat.exists" | |||
| @@ -12,12 +12,12 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-googlechat \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-mautrix-googlechat \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -33,8 +33,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-google | |||
| {{ matrix_mautrix_googlechat_docker_image }} \ | |||
| python3 -m mautrix_googlechat -c /config/config.yaml --no-update | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-googlechat 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-googlechat 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-googlechat 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-googlechat 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-mautrix-googlechat | |||
| @@ -44,8 +44,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_hangouts_docker_image_force_pull }}" | |||
| when: not matrix_mautrix_hangouts_container_image_self_build | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure Mautrix Hangouts paths exist | |||
| @@ -122,7 +122,7 @@ | |||
| - name: Ensure matrix-mautrix-hangouts.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-mautrix-hangouts.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-mautrix-hangouts.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-hangouts.service" | |||
| mode: 0644 | |||
| register: matrix_mautrix_hangouts_systemd_service_result | |||
| @@ -2,7 +2,7 @@ | |||
| - name: Check existence of matrix-mautrix-hangouts service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-hangouts.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-hangouts.service" | |||
| register: matrix_mautrix_hangouts_service_stat | |||
| - name: Ensure matrix-mautrix-hangouts is stopped | |||
| @@ -15,7 +15,7 @@ | |||
| - name: Ensure matrix-mautrix-hangouts.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-hangouts.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-hangouts.service" | |||
| state: absent | |||
| when: "matrix_mautrix_hangouts_service_stat.stat.exists" | |||
| @@ -12,10 +12,10 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-hangouts matrix-mautrix-hangouts-db 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-hangouts matrix-mautrix-hangouts-db 2>/dev/null || true' | |||
| ExecStartPre={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-hangouts-db \ | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-hangouts matrix-mautrix-hangouts-db 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-hangouts matrix-mautrix-hangouts-db 2>/dev/null || true' | |||
| ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-mautrix-hangouts-db \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -28,7 +28,7 @@ ExecStartPre={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-han | |||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-hangouts \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-mautrix-hangouts \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -44,8 +44,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-hangou | |||
| {{ matrix_mautrix_hangouts_docker_image }} \ | |||
| python3 -m mautrix_hangouts -c /config/config.yaml --no-update | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-hangouts 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-hangouts 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-hangouts 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-hangouts 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-mautrix-hangouts | |||
| @@ -15,8 +15,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_instagram_docker_image_force_pull }}" | |||
| when: not matrix_mautrix_instagram_container_image_self_build | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| - name: Ensure Mautrix instagram paths exist | |||
| @@ -75,7 +75,7 @@ | |||
| - name: Ensure matrix-mautrix-instagram.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-mautrix-instagram.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-mautrix-instagram.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-instagram.service" | |||
| mode: 0644 | |||
| register: matrix_mautrix_instagram_systemd_service_result | |||
| @@ -1,7 +1,7 @@ | |||
| --- | |||
| - name: Check existence of matrix-mautrix-instagram service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-instagram.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-instagram.service" | |||
| register: matrix_mautrix_instagram_service_stat | |||
| - name: Ensure matrix-mautrix-instagram is stopped | |||
| @@ -14,7 +14,7 @@ | |||
| - name: Ensure matrix-mautrix-instagram.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-instagram.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-instagram.service" | |||
| state: absent | |||
| when: "matrix_mautrix_instagram_service_stat.stat.exists" | |||
| @@ -12,14 +12,14 @@ DefaultDependencies=no | |||
| [Service] | |||
| Type=simple | |||
| Environment="HOME={{ matrix_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-instagram 2>/dev/null || true' | |||
| ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-instagram 2>/dev/null || true' | |||
| Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}" | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-instagram 2>/dev/null || true' | |||
| ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-instagram 2>/dev/null || true' | |||
| # Intentional delay, so that the homeserver (we likely depend on) can manage to start. | |||
| ExecStartPre={{ matrix_host_command_sleep }} 5 | |||
| ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-instagram \ | |||
| ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-mautrix-instagram \ | |||
| --log-driver=none \ | |||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | |||
| --cap-drop=ALL \ | |||
| @@ -32,8 +32,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-instag | |||
| {{ matrix_mautrix_instagram_docker_image }} \ | |||
| python3 -m mautrix_instagram -c /config/config.yaml --no-update | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-instagram 2>/dev/null || true' | |||
| ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-instagram 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-instagram 2>/dev/null || true' | |||
| ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-instagram 2>/dev/null || true' | |||
| Restart=always | |||
| RestartSec=30 | |||
| SyslogIdentifier=matrix-mautrix-instagram | |||
| @@ -16,8 +16,8 @@ | |||
| force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_signal_docker_image_force_pull }}" | |||
| when: "not matrix_mautrix_signal_container_image_self_build | bool" | |||
| register: result | |||
| retries: "{{ matrix_container_retries_count }}" | |||
| delay: "{{ matrix_container_retries_delay }}" | |||
| retries: "{{ devture_playbook_help_container_retries_count }}" | |||
| delay: "{{ devture_playbook_help_container_retries_delay }}" | |||
| until: result is not failed | |||
| @@ -120,14 +120,14 @@ | |||
| - name: Ensure matrix-mautrix-signal-daemon.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-mautrix-signal-daemon.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-mautrix-signal-daemon.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal-daemon.service" | |||
| mode: 0644 | |||
| register: matrix_mautrix_signal_daemon_systemd_service_result | |||
| - name: Ensure matrix-mautrix-signal.service installed | |||
| ansible.builtin.template: | |||
| src: "{{ role_path }}/templates/systemd/matrix-mautrix-signal.service.j2" | |||
| dest: "{{ matrix_systemd_path }}/matrix-mautrix-signal.service" | |||
| dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal.service" | |||
| mode: 0644 | |||
| register: matrix_mautrix_signal_systemd_service_result | |||
| @@ -3,7 +3,7 @@ | |||
| # Signal daemon service | |||
| - name: Check existence of matrix-mautrix-signal-daemon service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-signal-daemon.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal-daemon.service" | |||
| register: matrix_mautrix_signal_daemon_service_stat | |||
| - name: Ensure matrix-mautrix-signal-daemon is stopped | |||
| @@ -16,14 +16,14 @@ | |||
| - name: Ensure matrix-mautrix-signal-daemon.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-signal-daemon.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal-daemon.service" | |||
| state: absent | |||
| when: "matrix_mautrix_signal_daemon_service_stat.stat.exists" | |||
| # Bridge service | |||
| - name: Check existence of matrix-mautrix-signal service | |||
| ansible.builtin.stat: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-signal.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal.service" | |||
| register: matrix_mautrix_signal_service_stat | |||
| - name: Ensure matrix-mautrix-signal is stopped | |||
| @@ -36,7 +36,7 @@ | |||
| - name: Ensure matrix-mautrix-signal.service doesn't exist | |||
| ansible.builtin.file: | |||
| path: "{{ matrix_systemd_path }}/matrix-mautrix-signal.service" | |||
| path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal.service" | |||
| state: absent | |||
| when: "matrix_mautrix_signal_service_stat.stat.exists" | |||