Merge branch 'master' into make-etherpad-great-again

This commit is contained in:
Aine 2022-11-04 17:36:15 +02:00
commit 9b97957022
No known key found for this signature in database
GPG key ID: 34969C908CCA2804
243 changed files with 970 additions and 973 deletions

View file

@ -1,3 +1,24 @@
# 2022-11-04
## The playbook now uses external roles for some things
**TLDR**: when updating the playbook and before running it, you'll need to run `make roles` to make [ansible-galaxy](https://docs.ansible.com/ansible/latest/cli/ansible-galaxy.html) download dependency roles (see the [`requirements.yml` file](requirements.yml)) to the `roles/galaxy` directory. Without this, the playbook won't work.
We're in the process of trimming the playbook and making it reuse Ansible roles.
Starting now, the playbook is composed of 2 types of Ansible roles:
- those that live within the playbook itself (`roles/custom/*`)
- those downloaded from other sources (using [ansible-galaxy](https://docs.ansible.com/ansible/latest/cli/ansible-galaxy.html) to `roles/galaxy`, based on the [`requirements.yml` file](requirements.yml)). These roles are maintained by us or by other people from the Ansible community.
We're doing this for greater code-reuse (across Ansible playbooks, including our own related playbooks [gitea-docker-ansible-deploy](https://github.com/spantaleev/gitea-docker-ansible-deploy) and [nextcloud-docker-ansible-deploy](https://github.com/spantaleev/nextcloud-docker-ansible-deploy)) and decreased maintenance burden. Until now, certain features were copy-pasted across playbooks or were maintained separately in each one, with improvements often falling behind. We've also tended to do too much by ourselves - installing Docker on the server from our `matrix-base` role, etc. - something that we'd rather not do anymore by switching to the [geerlingguy.docker](https://galaxy.ansible.com/geerlingguy/docker) role.
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.
# 2022-10-14 # 2022-10-14
## synapse-s3-storage-provider support ## synapse-s3-storage-provider support

View file

@ -4,6 +4,7 @@ help: ## Show this help.
@grep -F -h "##" $(MAKEFILE_LIST) | grep -v grep | sed -e 's/\\$$//' | sed -e 's/##//' @grep -F -h "##" $(MAKEFILE_LIST) | grep -v grep | sed -e 's/\\$$//' | sed -e 's/##//'
roles: ## Pull roles roles: ## Pull roles
rm -rf roles/galaxy
ansible-galaxy install -r requirements.yml -p roles/galaxy/ --force ansible-galaxy install -r requirements.yml -p roles/galaxy/ --force
lint: ## Runs ansible-lint against all roles in the playbook lint: ## Runs ansible-lint against all roles in the playbook

View file

@ -2,6 +2,9 @@
If you've [configured your DNS](configuring-dns.md) and have [configured the playbook](configuring-playbook.md), you can start the installation procedure. 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`.
## Playbook tags introduction ## Playbook tags introduction
The Ansible playbook's tasks are tagged, so that certain parts of the Ansible playbook can be run without running all other tasks. The Ansible playbook's tasks are tagged, so that certain parts of the Ansible playbook can be run without running all other tasks.

View file

@ -10,8 +10,8 @@ To upgrade services:
- take a look at [the changelog](../CHANGELOG.md) to see if there have been any backward-incompatible changes that you need to take care of - take a look at [the changelog](../CHANGELOG.md) to see if there have been any backward-incompatible changes that you need to take care of
- re-run the [playbook setup](installing.md): `ansible-playbook -i inventory/hosts setup.yml --tags=setup-all` - download the upstream Ansible roles used by the playbook by running `make roles`
- restart the services: `ansible-playbook -i inventory/hosts setup.yml --tags=start` - re-run the [playbook setup](installing.md) and restart all serivces: `ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,ensure-matrix-users-created,start`
**Note**: major version upgrades to the internal PostgreSQL database are not done automatically. To upgrade it, refer to the [upgrading PostgreSQL guide](maintenance-postgres.md#upgrading-postgresql). **Note**: major version upgrades to the internal PostgreSQL database are not done automatically. To upgrade it, refer to the [upgrading PostgreSQL guide](maintenance-postgres.md#upgrading-postgresql).

View file

@ -9,6 +9,46 @@
# You can also override ANY variable (seen here or in any given role), # You can also override ANY variable (seen here or in any given role),
# by re-defining it in your own configuration file (`inventory/host_vars/matrix.<your-domain>`). # 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 #
# #
########################################################################
######################################################################
#
# com.devture.ansible.role.playbook_state_preserver
#
######################################################################
# To completely disable this feature, use `devture_playbook_state_preserver_enabled: false`.
devture_playbook_state_preserver_uid: "{{ matrix_user_uid }}"
devture_playbook_state_preserver_gid: "{{ matrix_user_gid }}"
devture_playbook_state_preserver_vars_preservation_dst: "{{ matrix_base_data_path }}/vars.yml"
devture_playbook_state_preserver_commit_hash_preservation_dst: "{{ matrix_base_data_path }}/git_hash.yml"
######################################################################
#
# /com.devture.ansible.role.playbook_state_preserver
#
######################################################################
###################################################################### ######################################################################
# #
# matrix-base # matrix-base

16
requirements.yml Normal file
View file

@ -0,0 +1,16 @@
---
- src: git+https://github.com/devture/com.devture.ansible.role.playbook_help.git
version: c1f40e82b4d6b072b6f0e885239322bdaaaf554f
- 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
- src: git+https://github.com/devture/com.devture.ansible.role.playbook_runtime_messages.git
version: f1c78d4e85e875129790c58335d0e44385683f6b

View file

@ -66,8 +66,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_backup_borg_docker_image_force_pull }}" 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" when: "not matrix_backup_borg_container_image_self_build | bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure borg repository is present on self-build - name: Ensure borg repository is present on self-build
@ -96,14 +96,14 @@
- name: Ensure matrix-backup-borg.service installed - name: Ensure matrix-backup-borg.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-backup-borg.service.j2" 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 mode: 0644
register: matrix_backup_borg_systemd_service_result register: matrix_backup_borg_systemd_service_result
- name: Ensure matrix-backup-borg.timer installed - name: Ensure matrix-backup-borg.timer installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-backup-borg.timer.j2" 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 mode: 0644
register: matrix_backup_borg_systemd_timer_result register: matrix_backup_borg_systemd_timer_result

View file

@ -1,7 +1,7 @@
--- ---
- name: Check existence of matrix-backup-borg service - name: Check existence of matrix-backup-borg service
ansible.builtin.stat: 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 register: matrix_backup_borg_service_stat
- name: Ensure matrix-backup-borg is stopped - name: Ensure matrix-backup-borg is stopped
@ -15,13 +15,13 @@
- name: Ensure matrix-backup-borg.service doesn't exist - name: Ensure matrix-backup-borg.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-backup-borg.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.service"
state: absent state: absent
when: "matrix_backup_borg_service_stat.stat.exists | bool" when: "matrix_backup_borg_service_stat.stat.exists | bool"
- name: Ensure matrix-backup-borg.timer doesn't exist - name: Ensure matrix-backup-borg.timer doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-backup-borg.timer" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-backup-borg.timer"
state: absent state: absent
when: "matrix_backup_borg_service_stat.stat.exists | bool" when: "matrix_backup_borg_service_stat.stat.exists | bool"

View file

@ -12,10 +12,10 @@ DefaultDependencies=no
[Service] [Service]
Type=oneshot Type=oneshot
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-backup-borg 2>/dev/null || true'
ExecStartPre=-{{ matrix_host_command_docker }} run --rm --name matrix-backup-borg \ ExecStartPre=-{{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-backup-borg \
--log-driver=none \ --log-driver=none \
--cap-drop=ALL \ --cap-drop=ALL \
--read-only \ --read-only \
@ -33,7 +33,7 @@ ExecStartPre=-{{ matrix_host_command_docker }} run --rm --name matrix-backup-bor
{{ matrix_backup_borg_docker_image }} \ {{ matrix_backup_borg_docker_image }} \
sh -c "borgmatic --init --encryption {{ matrix_backup_borg_encryption }}" 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 \ --log-driver=none \
--cap-drop=ALL \ --cap-drop=ALL \
--read-only \ --read-only \
@ -50,8 +50,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-backup-borg \
{% endfor %} {% endfor %}
{{ matrix_backup_borg_docker_image }} {{ matrix_backup_borg_docker_image }}
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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 }} rm matrix-backup-borg 2>/dev/null || true'
SyslogIdentifier=matrix-backup-borg SyslogIdentifier=matrix-backup-borg
[Install] [Install]

View file

@ -95,14 +95,6 @@ matrix_debian_arch: "{{ 'armhf' if matrix_architecture == 'arm32' else matrix_ar
matrix_container_global_registry_prefix: "docker.io/" 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_username: "matrix"
matrix_user_groupname: "matrix" matrix_user_groupname: "matrix"
@ -116,12 +108,6 @@ matrix_base_data_path: "/matrix"
matrix_base_data_path_mode: "750" matrix_base_data_path_mode: "750"
matrix_static_files_base_path: "{{ matrix_base_data_path }}/static-files" 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. # This is now unused. We keep it so that cleanup tasks can use it.
# To be removed in the future. # To be removed in the future.
@ -129,16 +115,10 @@ matrix_cron_path: "/etc/cron.d"
matrix_local_bin_path: "/usr/local/bin" 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_sleep: "/usr/bin/env sleep"
matrix_host_command_chown: "/usr/bin/env chown" matrix_host_command_chown: "/usr/bin/env chown"
matrix_host_command_fusermount: "/usr/bin/env fusermount" matrix_host_command_fusermount: "/usr/bin/env fusermount"
matrix_host_command_openssl: "/usr/bin/env openssl" 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 }}" matrix_homeserver_url: "https://{{ matrix_server_fqn_matrix }}"
@ -258,12 +238,6 @@ matrix_well_known_matrix_support_configuration: "{{ matrix_well_known_matrix_sup
# The Docker network that all services would be put into # The Docker network that all services would be put into
matrix_docker_network: "matrix" matrix_docker_network: "matrix"
# Controls whether we'll preserve the vars.yml file on the Matrix server.
# If you have a differently organized inventory, you may wish to disable this feature,
# or to repoint `matrix_vars_yml_snapshotting_src` to the file you'd like to preserve.
matrix_vars_yml_snapshotting_enabled: true
matrix_vars_yml_snapshotting_src: "{{ inventory_dir }}/host_vars/{{ inventory_hostname }}/vars.yml"
# Controls whether a `/.well-known/matrix/server` file is generated and used at all. # Controls whether a `/.well-known/matrix/server` file is generated and used at all.
# #
# If you wish to rely on DNS SRV records only, you can disable this. # If you wish to rely on DNS SRV records only, you can disable this.
@ -287,11 +261,6 @@ matrix_docker_installation_enabled: true
# Possible values are "docker-ce" (default) and "docker.io" (Debian). # Possible values are "docker-ce" (default) and "docker.io" (Debian).
matrix_docker_package_name: docker-ce matrix_docker_package_name: docker-ce
# Controls whether the current playbook's commit hash is saved in `git_hash.yml` on the target
# Set this to false if GIT is not installed on the local system (the system where the ansible command is run on)
# to suppress the warning message.
matrix_playbook_commit_hash_preservation_enabled: true
# Variables to Control which parts of our roles run. # Variables to Control which parts of our roles run.
run_postgres_import: true run_postgres_import: true
run_postgres_upgrade: true run_postgres_upgrade: true

View file

@ -39,9 +39,3 @@
name: docker name: docker
state: started state: started
enabled: true enabled: true
- name: "Ensure ntpd is started and autoruns"
ansible.builtin.service:
name: "{{ matrix_ntpd_service }}"
state: started
enabled: true

View file

@ -25,13 +25,6 @@
update_cache: true update_cache: true
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' 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 - name: Ensure Docker is installed
ansible.builtin.apt: ansible.builtin.apt:
name: name:

View file

@ -17,13 +17,6 @@
key: https://download.docker.com/linux/fedora/gpg key: https://download.docker.com/linux/fedora/gpg
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' 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 - name: Ensure Docker is installed
ansible.builtin.yum: ansible.builtin.yum:
name: name:

View file

@ -25,13 +25,6 @@
update_cache: true update_cache: true
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' 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 - name: Ensure Docker is installed
ansible.builtin.apt: ansible.builtin.apt:
name: name:

View file

@ -15,13 +15,6 @@
key: https://download.docker.com/linux/centos/gpg key: https://download.docker.com/linux/centos/gpg
when: matrix_docker_installation_enabled | bool and matrix_docker_package_name == 'docker-ce' 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 - name: Ensure Docker is installed
ansible.builtin.yum: ansible.builtin.yum:
name: name:

View file

@ -22,13 +22,6 @@
state: present state: present
update_cache: true 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 - name: Ensure Docker is installed
ansible.builtin.yum: ansible.builtin.yum:
name: name:

View file

@ -10,61 +10,6 @@
with_items: with_items:
- "{{ matrix_base_data_path }}" - "{{ matrix_base_data_path }}"
- name: Preserve vars.yml on the server for easily restoring if it gets lost later on
ansible.builtin.copy:
src: "{{ matrix_vars_yml_snapshotting_src }}"
dest: "{{ matrix_base_data_path }}/vars.yml"
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
mode: '0660'
when: "matrix_vars_yml_snapshotting_enabled | bool"
- name: Save current git-repo status on the target to aid with restoring in case of problems
when: "matrix_playbook_commit_hash_preservation_enabled|bool"
block:
- name: Get local git hash # noqa command-instead-of-module
delegate_to: 127.0.0.1
become: false
register: git_describe
changed_when: false
ansible.builtin.shell:
git describe
--always
--tags
--dirty
--long
--all
- ansible.builtin.set_fact:
git_hash: "{{ git_describe.stdout }}"
- name: Git hash
ansible.builtin.debug:
msg: "Git hash: {{ git_hash }}"
- name: Save git_hash.yml on target
ansible.builtin.copy:
content: "{{ git_hash }}"
dest: "{{ matrix_base_data_path }}/git_hash.yml"
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
mode: '0660'
rescue:
- name: GIT not found error
ansible.builtin.debug:
msg: >-
Couldn't find GIT on the local machine. Continuing without saving the GIT hash.
You can disable saving the GIT hash by setting 'matrix_playbook_commit_hash_preservation_enabled: false' in vars.yml
when: "git_describe.stderr.find('git: not found') != -1"
- name: Get GIT hash error
ansible.builtin.fail:
msg: >-
Error when trying to get the GIT hash. Please consult the error message above.
You can disable saving the GIT hash by setting 'matrix_playbook_commit_hash_preservation_enabled: false' in vars.yml
when: "git_describe.stderr.find('git: not found') == -1"
- name: Ensure Matrix network is created in Docker - name: Ensure Matrix network is created in Docker
community.docker.docker_network: community.docker.docker_network:
name: "{{ matrix_docker_network }}" name: "{{ matrix_docker_network }}"

View file

@ -16,9 +16,9 @@ if [ "$sure" != "Yes, I really want to remove everything!" ]; then
else else
echo "Stop and remove matrix services" 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 systemctl disable --now $s
rm -f {{ matrix_systemd_path }}/$s rm -f {{ devture_systemd_docker_base_systemd_path }}/$s
done done
systemctl daemon-reload systemctl daemon-reload

View file

@ -57,8 +57,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_buscarron_docker_image_force_pull }}" 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" when: "not matrix_bot_buscarron_container_image_self_build | bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure buscarron repository is present on self-build - name: Ensure buscarron repository is present on self-build
@ -87,7 +87,7 @@
- name: Ensure matrix-bot-buscarron.service installed - name: Ensure matrix-bot-buscarron.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-bot-buscarron.service.j2" 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 mode: 0644
register: matrix_bot_buscarron_systemd_service_result register: matrix_bot_buscarron_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-buscarron service - name: Check existence of matrix-buscarron service
ansible.builtin.stat: 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 register: matrix_bot_buscarron_service_stat
- name: Ensure matrix-buscarron is stopped - name: Ensure matrix-buscarron is stopped
@ -16,7 +16,7 @@
- name: Ensure matrix-bot-buscarron.service doesn't exist - name: Ensure matrix-bot-buscarron.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-bot-buscarron.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-buscarron.service"
state: absent state: absent
when: "matrix_bot_buscarron_service_stat.stat.exists | bool" when: "matrix_bot_buscarron_service_stat.stat.exists | bool"

View file

@ -12,11 +12,11 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -29,8 +29,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-buscarron
{% endfor %} {% endfor %}
{{ matrix_bot_buscarron_docker_image }} {{ matrix_bot_buscarron_docker_image }}
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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 }} rm matrix-bot-buscarron 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-bot-buscarron SyslogIdentifier=matrix-bot-buscarron

View file

@ -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_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 }}" force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_go_neb_docker_image_force_pull }}"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure go-neb config installed - name: Ensure go-neb config installed
@ -38,7 +38,7 @@
- name: Ensure matrix-bot-go-neb.service installed - name: Ensure matrix-bot-go-neb.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-bot-go-neb.service.j2" 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 mode: 0644
register: matrix_bot_go_neb_systemd_service_result register: matrix_bot_go_neb_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-go-neb service - name: Check existence of matrix-go-neb service
ansible.builtin.stat: 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 register: matrix_bot_go_neb_service_stat
- name: Ensure matrix-go-neb is stopped - name: Ensure matrix-go-neb is stopped
@ -16,7 +16,7 @@
- name: Ensure matrix-bot-go-neb.service doesn't exist - name: Ensure matrix-bot-go-neb.service doesn't exist
ansible.builtin.file: 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 state: absent
when: "matrix_bot_go_neb_service_stat.stat.exists | bool" when: "matrix_bot_go_neb_service_stat.stat.exists | bool"

View file

@ -12,11 +12,11 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --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 }} \ {{ matrix_bot_go_neb_docker_image }} \
-c "go-neb /config/config.yaml" -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=-{{ 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=-{{ 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 }} rm matrix-bot-go-neb 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-bot-go-neb SyslogIdentifier=matrix-bot-go-neb

View file

@ -57,8 +57,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_honoroit_docker_image_force_pull }}" 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" when: "not matrix_bot_honoroit_container_image_self_build | bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure honoroit repository is present on self-build - name: Ensure honoroit repository is present on self-build
@ -87,7 +87,7 @@
- name: Ensure matrix-bot-honoroit.service installed - name: Ensure matrix-bot-honoroit.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-bot-honoroit.service.j2" 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 mode: 0644
register: matrix_bot_honoroit_systemd_service_result register: matrix_bot_honoroit_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-honoroit service - name: Check existence of matrix-honoroit service
ansible.builtin.stat: 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 register: matrix_bot_honoroit_service_stat
- name: Ensure matrix-honoroit is stopped - name: Ensure matrix-honoroit is stopped
@ -16,7 +16,7 @@
- name: Ensure matrix-bot-honoroit.service doesn't exist - name: Ensure matrix-bot-honoroit.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-bot-honoroit.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-honoroit.service"
state: absent state: absent
when: "matrix_bot_honoroit_service_stat.stat.exists | bool" when: "matrix_bot_honoroit_service_stat.stat.exists | bool"

View file

@ -12,11 +12,11 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -29,8 +29,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-honoroit \
{% endfor %} {% endfor %}
{{ matrix_bot_honoroit_docker_image }} {{ matrix_bot_honoroit_docker_image }}
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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 }} rm matrix-bot-honoroit 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-bot-honoroit SyslogIdentifier=matrix-bot-honoroit

View file

@ -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 }}" 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" when: "not matrix_bot_matrix_registration_bot_container_image_self_build | bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure matrix-registration-bot repository is present on self-build - name: Ensure matrix-registration-bot repository is present on self-build
@ -59,7 +59,7 @@
- name: Ensure matrix-bot-matrix-registration-bot.service installed - name: Ensure matrix-bot-matrix-registration-bot.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-bot-matrix-registration-bot.service.j2" 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 mode: 0644
register: matrix_bot_matrix_registration_bot_systemd_service_result register: matrix_bot_matrix_registration_bot_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-matrix-registration-bot service - name: Check existence of matrix-matrix-registration-bot service
ansible.builtin.stat: 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 register: matrix_bot_matrix_registration_bot_service_stat
- name: Ensure matrix-matrix-registration-bot is stopped - name: Ensure matrix-matrix-registration-bot is stopped
@ -16,7 +16,7 @@
- name: Ensure matrix-bot-matrix-registration-bot.service doesn't exist - name: Ensure matrix-bot-matrix-registration-bot.service doesn't exist
ansible.builtin.file: 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 state: absent
when: "matrix_bot_matrix_registration_bot_service_stat.stat.exists | bool" when: "matrix_bot_matrix_registration_bot_service_stat.stat.exists | bool"

View file

@ -12,11 +12,11 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_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=-{{ 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=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm 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 \ --log-driver=none \
--cap-drop=ALL \ --cap-drop=ALL \
-e "CONFIG_PATH=/config/config.yml" \ -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 }} \ --network={{ matrix_docker_network }} \
{{ matrix_bot_matrix_registration_bot_docker_image }} {{ 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=-{{ 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=-{{ 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 }} rm matrix-bot-matrix-registration-bot 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-bot-matrix-registration-bot SyslogIdentifier=matrix-bot-matrix-registration-bot

View file

@ -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 }}" 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" when: "not matrix_bot_matrix_reminder_bot_container_image_self_build | bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure matrix-reminder-bot repository is present on self-build - name: Ensure matrix-reminder-bot repository is present on self-build
@ -88,7 +88,7 @@
- name: Ensure matrix-bot-matrix-reminder-bot.service installed - name: Ensure matrix-bot-matrix-reminder-bot.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-bot-matrix-reminder-bot.service.j2" 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 mode: 0644
register: matrix_bot_matrix_reminder_bot_systemd_service_result register: matrix_bot_matrix_reminder_bot_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-matrix-reminder-bot service - name: Check existence of matrix-matrix-reminder-bot service
ansible.builtin.stat: 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 register: matrix_bot_matrix_reminder_bot_service_stat
- name: Ensure matrix-matrix-reminder-bot is stopped - name: Ensure matrix-matrix-reminder-bot is stopped
@ -16,7 +16,7 @@
- name: Ensure matrix-bot-matrix-reminder-bot.service doesn't exist - name: Ensure matrix-bot-matrix-reminder-bot.service doesn't exist
ansible.builtin.file: 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 state: absent
when: "matrix_bot_matrix_reminder_bot_service_stat.stat.exists | bool" when: "matrix_bot_matrix_reminder_bot_service_stat.stat.exists | bool"

View file

@ -12,11 +12,11 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_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=-{{ 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=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --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 }} \ {{ matrix_bot_matrix_reminder_bot_docker_image }} \
-c "matrix-reminder-bot /config/config.yaml" -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=-{{ 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=-{{ 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 }} rm matrix-bot-matrix-reminder-bot 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-bot-matrix-reminder-bot SyslogIdentifier=matrix-bot-matrix-reminder-bot

View file

@ -33,8 +33,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_maubot_docker_image_force_pull }}" 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" when: "not matrix_bot_maubot_container_image_self_build|bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure maubot repository is present on self-build - name: Ensure maubot repository is present on self-build
@ -63,7 +63,7 @@
- name: Ensure matrix-bot-maubot.service installed - name: Ensure matrix-bot-maubot.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-bot-maubot.service.j2" 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 mode: 0644
register: matrix_bot_maubot_systemd_service_result register: matrix_bot_maubot_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-maubot service - name: Check existence of matrix-maubot service
ansible.builtin.stat: 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 register: matrix_bot_maubot_service_stat
- name: Ensure matrix-bot-maubot is stopped - name: Ensure matrix-bot-maubot is stopped
@ -16,7 +16,7 @@
- name: Ensure matrix-bot-maubot.service doesn't exist - name: Ensure matrix-bot-maubot.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-bot-maubot.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-maubot.service"
state: absent state: absent
when: "matrix_bot_maubot_service_stat.stat.exists | bool" when: "matrix_bot_maubot_service_stat.stat.exists | bool"

View file

@ -12,11 +12,11 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--read-only \ --read-only \
@ -33,8 +33,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-maubot \
{{ matrix_bot_maubot_docker_image }} \ {{ matrix_bot_maubot_docker_image }} \
python3 -m maubot -c /config/config.yaml --no-update 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=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_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 }} rm matrix-bot-maubot 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-bot-maubot SyslogIdentifier=matrix-bot-maubot

View file

@ -25,8 +25,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_mjolnir_docker_image_force_pull }}" 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" when: "not matrix_bot_mjolnir_container_image_self_build | bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure mjolnir repository is present on self-build - name: Ensure mjolnir repository is present on self-build
@ -62,7 +62,7 @@
- name: Ensure matrix-bot-mjolnir.service installed - name: Ensure matrix-bot-mjolnir.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-bot-mjolnir.service.j2" 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 mode: 0644
register: matrix_bot_mjolnir_systemd_service_result register: matrix_bot_mjolnir_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-bot-mjolnir service - name: Check existence of matrix-bot-mjolnir service
ansible.builtin.stat: 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 register: matrix_bot_mjolnir_service_stat
- name: Ensure matrix-bot-mjolnir is stopped - name: Ensure matrix-bot-mjolnir is stopped
@ -16,7 +16,7 @@
- name: Ensure matrix-bot-mjolnir.service doesn't exist - name: Ensure matrix-bot-mjolnir.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-bot-mjolnir.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-mjolnir.service"
state: absent state: absent
when: "matrix_bot_mjolnir_service_stat.stat.exists | bool" when: "matrix_bot_mjolnir_service_stat.stat.exists | bool"

View file

@ -12,14 +12,14 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -32,8 +32,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-mjolnir \
{% endfor %} {% endfor %}
{{ matrix_bot_mjolnir_docker_image }} {{ matrix_bot_mjolnir_docker_image }}
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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 }} rm matrix-bot-mjolnir 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-bot-mjolnir SyslogIdentifier=matrix-bot-mjolnir

View file

@ -53,8 +53,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_bot_postmoogle_docker_image_force_pull }}" 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" when: "not matrix_bot_postmoogle_container_image_self_build | bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure postmoogle repository is present on self-build - name: Ensure postmoogle repository is present on self-build
@ -83,7 +83,7 @@
- name: Ensure matrix-bot-postmoogle.service installed - name: Ensure matrix-bot-postmoogle.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-bot-postmoogle.service.j2" 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 mode: 0644
register: matrix_bot_postmoogle_systemd_service_result register: matrix_bot_postmoogle_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-postmoogle service - name: Check existence of matrix-postmoogle service
ansible.builtin.stat: 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 register: matrix_bot_postmoogle_service_stat
- name: Ensure matrix-postmoogle is stopped - name: Ensure matrix-postmoogle is stopped
@ -16,7 +16,7 @@
- name: Ensure matrix-bot-postmoogle.service doesn't exist - name: Ensure matrix-bot-postmoogle.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-bot-postmoogle.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-bot-postmoogle.service"
state: absent state: absent
when: "matrix_bot_postmoogle_service_stat.stat.exists | bool" when: "matrix_bot_postmoogle_service_stat.stat.exists | bool"

View file

@ -12,11 +12,11 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -36,8 +36,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-postmoogle
{% endfor %} {% endfor %}
{{ matrix_bot_postmoogle_docker_image }} {{ matrix_bot_postmoogle_docker_image }}
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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 }} rm matrix-bot-postmoogle 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-bot-postmoogle SyslogIdentifier=matrix-bot-postmoogle

View file

@ -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_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 }}" force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_discord_docker_image_force_pull }}"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure AppService Discord paths exist - name: Ensure AppService Discord paths exist
@ -93,7 +93,7 @@
# We intentionally suppress Ansible changes. # We intentionally suppress Ansible changes.
- name: Generate AppService Discord invite link - name: Generate AppService Discord invite link
ansible.builtin.shell: >- 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 }} --user={{ matrix_user_uid }}:{{ matrix_user_gid }}
--cap-drop=ALL --cap-drop=ALL
--mount type=bind,src={{ matrix_appservice_discord_config_path }},dst=/cfg --mount type=bind,src={{ matrix_appservice_discord_config_path }},dst=/cfg
@ -105,7 +105,7 @@
- name: Ensure matrix-appservice-discord.service installed - name: Ensure matrix-appservice-discord.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-appservice-discord.service.j2" 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 mode: 0644
register: matrix_appservice_discord_systemd_service_result register: matrix_appservice_discord_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-appservice-discord service - name: Check existence of matrix-appservice-discord service
ansible.builtin.stat: 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 register: matrix_appservice_discord_service_stat
- name: Ensure matrix-appservice-discord is stopped - name: Ensure matrix-appservice-discord is stopped
@ -15,7 +15,7 @@
- name: Ensure matrix-appservice-discord.service doesn't exist - name: Ensure matrix-appservice-discord.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-appservice-discord.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-discord.service"
state: absent state: absent
when: "matrix_appservice_discord_service_stat.stat.exists" when: "matrix_appservice_discord_service_stat.stat.exists"

View file

@ -12,14 +12,14 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -35,8 +35,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-dis
{{ matrix_appservice_discord_docker_image }} \ {{ matrix_appservice_discord_docker_image }} \
node /build/src/discordas.js -p 9005 -c /cfg/config.yaml -f /cfg/registration.yaml 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=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_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 }} rm matrix-appservice-discord 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-appservice-discord SyslogIdentifier=matrix-appservice-discord

View file

@ -30,7 +30,7 @@
- name: Check existence of matrix-appservice-irc service - name: Check existence of matrix-appservice-irc service
ansible.builtin.stat: 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 register: matrix_appservice_irc_service_stat
- name: Ensure matrix-appservice-irc is stopped - name: Ensure matrix-appservice-irc is stopped
@ -42,7 +42,7 @@
- name: Import appservice-irc NeDB database into Postgres - name: Import appservice-irc NeDB database into Postgres
ansible.builtin.command: ansible.builtin.command:
cmd: >- cmd: >-
{{ matrix_host_command_docker }} run {{ devture_systemd_docker_base_host_command_docker }} run
--rm --rm
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} --user={{ matrix_user_uid }}:{{ matrix_user_gid }}
--cap-drop=ALL --cap-drop=ALL
@ -66,9 +66,9 @@
- name: Inject result - name: Inject result
ansible.builtin.set_fact: 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." "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."

View file

@ -71,8 +71,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_irc_docker_image_force_pull }}" 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" when: "matrix_appservice_irc_enabled | bool and not matrix_appservice_irc_container_image_self_build | bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure matrix-appservice-irc repository is present when self-building - name: Ensure matrix-appservice-irc repository is present when self-building
@ -147,7 +147,7 @@
# to produce a final registration.yaml file, as we desire. # to produce a final registration.yaml file, as we desire.
- name: Generate Appservice IRC registration-template.yaml - name: Generate Appservice IRC registration-template.yaml
ansible.builtin.shell: >- 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 }} --user={{ matrix_user_uid }}:{{ matrix_user_gid }}
--cap-drop=ALL --cap-drop=ALL
-v {{ matrix_appservice_irc_config_path }}:/config:z -v {{ matrix_appservice_irc_config_path }}:/config:z
@ -193,7 +193,7 @@
- name: Ensure matrix-appservice-irc.service installed - name: Ensure matrix-appservice-irc.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-appservice-irc.service.j2" 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 mode: 0644
register: matrix_appservice_irc_systemd_service_result register: matrix_appservice_irc_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-appservice-irc service - name: Check existence of matrix-appservice-irc service
ansible.builtin.stat: 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 register: matrix_appservice_irc_service_stat
- name: Ensure matrix-appservice-irc is stopped - name: Ensure matrix-appservice-irc is stopped
@ -15,7 +15,7 @@
- name: Ensure matrix-appservice-irc.service doesn't exist - name: Ensure matrix-appservice-irc.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-appservice-irc.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-irc.service"
state: absent state: absent
when: "matrix_appservice_irc_service_stat.stat.exists" when: "matrix_appservice_irc_service_stat.stat.exists"

View file

@ -12,14 +12,14 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -36,8 +36,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-irc
{{ matrix_appservice_irc_docker_image }} \ {{ matrix_appservice_irc_docker_image }} \
-c 'node app.js -c /config/config.yaml -f /config/registration.yaml -p 9999' -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=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_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 }} rm matrix-appservice-irc 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-appservice-irc SyslogIdentifier=matrix-appservice-irc

View file

@ -16,8 +16,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_kakaotalk_docker_image_force_pull }}" 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 when: not matrix_appservice_kakaotalk_container_image_self_build
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure matrix-appservice-kakaotalk-node image is pulled - 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 }}" 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 when: not matrix_appservice_kakaotalk_container_image_self_build
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure matrix-appservice-kakaotalk paths exist - name: Ensure matrix-appservice-kakaotalk paths exist
@ -108,14 +108,14 @@
- name: Ensure matrix-appservice-kakaotalk-node.service installed - name: Ensure matrix-appservice-kakaotalk-node.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-appservice-kakaotalk-node.service.j2" 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 mode: 0644
register: matrix_appservice_kakaotalk_node_systemd_service_result register: matrix_appservice_kakaotalk_node_systemd_service_result
- name: Ensure matrix-appservice-kakaotalk.service installed - name: Ensure matrix-appservice-kakaotalk.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-appservice-kakaotalk.service.j2" 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 mode: 0644
register: matrix_appservice_kakaotalk_systemd_service_result register: matrix_appservice_kakaotalk_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-appservice-kakaotalk service - name: Check existence of matrix-appservice-kakaotalk service
ansible.builtin.stat: 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 register: matrix_appservice_kakaotalk_service_stat
- name: Ensure matrix-appservice-kakaotalk is stopped - name: Ensure matrix-appservice-kakaotalk is stopped
@ -15,7 +15,7 @@
- name: Check existence of matrix-appservice-kakaotalk-node service - name: Check existence of matrix-appservice-kakaotalk-node service
ansible.builtin.stat: 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 register: matrix_appservice_kakaotalk_node_service_stat
- name: Ensure matrix-appservice-kakaotalk-node is stopped - name: Ensure matrix-appservice-kakaotalk-node is stopped
@ -31,8 +31,8 @@
path: "{{ item }}" path: "{{ item }}"
state: absent state: absent
with_items: with_items:
- "{{ matrix_systemd_path }}/matrix-appservice-kakaotalk-node.service" - "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk-node.service"
- "{{ matrix_systemd_path }}/matrix-appservice-kakaotalk.service" - "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-kakaotalk.service"
when: "matrix_appservice_kakaotalk_service_stat.stat.exists" when: "matrix_appservice_kakaotalk_service_stat.stat.exists"
- name: Ensure systemd reloaded after matrix-appservice-kakaotalk service files removal - name: Ensure systemd reloaded after matrix-appservice-kakaotalk service files removal

View file

@ -12,11 +12,11 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -28,8 +28,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-kak
{{ matrix_appservice_kakaotalk_node_docker_image }} \ {{ matrix_appservice_kakaotalk_node_docker_image }} \
node src/main.js --config /config.json 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=-{{ 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=-{{ 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 }} rm matrix-appservice-kakaotalk-node 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-appservice-kakaotalk-node SyslogIdentifier=matrix-appservice-kakaotalk-node

View file

@ -12,14 +12,14 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -32,8 +32,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-kak
{{ matrix_appservice_kakaotalk_docker_image }} \ {{ matrix_appservice_kakaotalk_docker_image }} \
python3 -m matrix_appservice_kakaotalk -c /config/config.yaml --no-update 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=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_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 }} rm matrix-appservice-kakaotalk 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-appservice-kakaotalk SyslogIdentifier=matrix-appservice-kakaotalk

View file

@ -36,7 +36,7 @@
- name: Import appservice-slack NeDB database into Postgres - name: Import appservice-slack NeDB database into Postgres
ansible.builtin.command: ansible.builtin.command:
cmd: >- cmd: >-
{{ matrix_host_command_docker }} run {{ devture_systemd_docker_base_host_command_docker }} run
--rm --rm
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} --user={{ matrix_user_uid }}:{{ matrix_user_gid }}
--cap-drop=ALL --cap-drop=ALL
@ -62,9 +62,9 @@
- name: Inject result - name: Inject result
ansible.builtin.set_fact: 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." "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."

View file

@ -39,8 +39,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_slack_docker_image_force_pull }}" 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" when: "not matrix_appservice_slack_container_image_self_build | bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure matrix-appservice-slack repository is present when self-building - name: Ensure matrix-appservice-slack repository is present when self-building
@ -85,7 +85,7 @@
- name: Ensure matrix-appservice-slack.service installed - name: Ensure matrix-appservice-slack.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-appservice-slack.service.j2" 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 mode: 0644
register: matrix_appservice_slack_systemd_service_result register: matrix_appservice_slack_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-appservice-slack service - name: Check existence of matrix-appservice-slack service
ansible.builtin.stat: 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 register: matrix_appservice_slack_service_stat
- name: Ensure matrix-appservice-slack is stopped - name: Ensure matrix-appservice-slack is stopped
@ -15,7 +15,7 @@
- name: Ensure matrix-appservice-slack.service doesn't exist - name: Ensure matrix-appservice-slack.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-appservice-slack.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-slack.service"
state: absent state: absent
when: "matrix_appservice_slack_service_stat.stat.exists" when: "matrix_appservice_slack_service_stat.stat.exists"

View file

@ -12,14 +12,14 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -35,8 +35,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-sla
{{ matrix_appservice_slack_docker_image }} \ {{ matrix_appservice_slack_docker_image }} \
node app.js -p {{matrix_appservice_slack_matrix_port}} -c /config/config.yaml -f /config/slack-registration.yaml 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=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_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 }} rm matrix-appservice-slack 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-appservice-slack SyslogIdentifier=matrix-appservice-slack

View file

@ -22,8 +22,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_appservice_webhooks_docker_image_force_pull }}" 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" when: "not matrix_appservice_webhooks_container_image_self_build | bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- when: "matrix_appservice_webhooks_container_image_self_build | bool" - when: "matrix_appservice_webhooks_container_image_self_build | bool"
@ -84,7 +84,7 @@
- name: Ensure matrix-appservice-webhooks.service installed - name: Ensure matrix-appservice-webhooks.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-appservice-webhooks.service.j2" 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 mode: 0644
register: matrix_appservice_webhooks_systemd_service_result register: matrix_appservice_webhooks_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-appservice-webhooks service - name: Check existence of matrix-appservice-webhooks service
ansible.builtin.stat: 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 register: matrix_appservice_webhooks_service_stat
- name: Ensure matrix-appservice-webhooks is stopped - name: Ensure matrix-appservice-webhooks is stopped
@ -15,7 +15,7 @@
- name: Ensure matrix-appservice-webhooks.service doesn't exist - name: Ensure matrix-appservice-webhooks.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-appservice-webhooks.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-appservice-webhooks.service"
state: absent state: absent
when: "matrix_appservice_webhooks_service_stat.stat.exists" when: "matrix_appservice_webhooks_service_stat.stat.exists"

View file

@ -12,14 +12,14 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -35,8 +35,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-appservice-web
{{ matrix_appservice_webhooks_docker_image }} \ {{ matrix_appservice_webhooks_docker_image }} \
node index.js -p {{ matrix_appservice_webhooks_matrix_port }} -c /config/config.yaml -f /config/webhooks-registration.yaml 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=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_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 }} rm matrix-appservice-webhooks 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-appservice-webhooks SyslogIdentifier=matrix-appservice-webhooks

View file

@ -30,8 +30,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_beeper_linkedin_docker_image_force_pull }}" 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" when: "not matrix_beeper_linkedin_container_image_self_build | bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- when: "matrix_beeper_linkedin_container_image_self_build | bool" - 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 - name: Ensure docker-requirements.txt is generated before building Beeper LinkedIn Docker Image
ansible.builtin.command: ansible.builtin.command:
cmd: | cmd: |
{{ matrix_host_command_docker }} run {{ devture_systemd_docker_base_host_command_docker }} run
--rm --rm
--entrypoint=/bin/sh --entrypoint=/bin/sh
--mount type=bind,src={{ matrix_beeper_linkedin_docker_src_files_path }},dst=/work --mount type=bind,src={{ matrix_beeper_linkedin_docker_src_files_path }},dst=/work
@ -93,7 +93,7 @@
- name: Ensure matrix-beeper-linkedin.service installed - name: Ensure matrix-beeper-linkedin.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-beeper-linkedin.service.j2" 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 mode: 0644
register: matrix_beeper_linkedin_systemd_service_result register: matrix_beeper_linkedin_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-beeper-linkedin service - name: Check existence of matrix-beeper-linkedin service
ansible.builtin.stat: 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 register: matrix_beeper_linkedin_service_stat
- name: Ensure matrix-beeper-linkedin is stopped - name: Ensure matrix-beeper-linkedin is stopped
@ -15,7 +15,7 @@
- name: Ensure matrix-beeper-linkedin.service doesn't exist - name: Ensure matrix-beeper-linkedin.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-beeper-linkedin.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-beeper-linkedin.service"
state: absent state: absent
when: "matrix_beeper_linkedin_service_stat.stat.exists" when: "matrix_beeper_linkedin_service_stat.stat.exists"

View file

@ -12,14 +12,14 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -32,8 +32,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-beeper-linkedi
{{ matrix_beeper_linkedin_docker_image }} \ {{ matrix_beeper_linkedin_docker_image }} \
python3 -m linkedin_matrix -c /data/config.yaml -r /data/registration.yaml 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=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_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 }} rm matrix-beeper-linkedin 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-beeper-linkedin SyslogIdentifier=matrix-beeper-linkedin

View file

@ -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 }}" 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 when: not matrix_go_skype_bridge_container_image_self_build
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure Go Skype Bridge repository is present on self-build - name: Ensure Go Skype Bridge repository is present on self-build
@ -132,7 +132,7 @@
- name: Ensure matrix-go-skype-bridge.service installed - name: Ensure matrix-go-skype-bridge.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-go-skype-bridge.service.j2" 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 mode: 0644
register: matrix_go_skype_bridge_systemd_service_result register: matrix_go_skype_bridge_systemd_service_result

View file

@ -12,14 +12,14 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --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 }} \ {{ matrix_go_skype_bridge_docker_image }} \
/usr/bin/matrix-skype -c /config/config.yaml -r /config/registration.yaml /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=-{{ 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=-{{ 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 }} rm matrix-go-skype-bridge 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-go-skype-bridge SyslogIdentifier=matrix-go-skype-bridge

View file

@ -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_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 }}" force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_heisenbridge_docker_image_force_pull }}"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure heisenbridge paths exist - name: Ensure heisenbridge paths exist
@ -32,7 +32,7 @@
- name: Ensure matrix-heisenbridge.service installed - name: Ensure matrix-heisenbridge.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-heisenbridge.service.j2" 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 mode: 0644
register: matrix_heisenbridge_systemd_service_result register: matrix_heisenbridge_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-heisenbridge service - name: Check existence of matrix-heisenbridge service
ansible.builtin.stat: 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 register: matrix_heisenbridge_service_stat
- name: Ensure matrix-heisenbridge is stopped - name: Ensure matrix-heisenbridge is stopped
@ -15,7 +15,7 @@
- name: Ensure matrix-heisenbridge.service doesn't exist - name: Ensure matrix-heisenbridge.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-heisenbridge.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-heisenbridge.service"
state: absent state: absent
when: "matrix_heisenbridge_service_stat.stat.exists" when: "matrix_heisenbridge_service_stat.stat.exists"

View file

@ -12,11 +12,11 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_docker }} kill matrix-heisenbridge ExecStartPre=-{{ devture_systemd_docker_base_host_command_docker }} kill matrix-heisenbridge
ExecStartPre=-{{ matrix_host_command_docker }} rm 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -41,8 +41,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-heisenbridge \
--listen-port 9898 \ --listen-port 9898 \
{{ matrix_heisenbridge_homeserver_url }} {{ matrix_heisenbridge_homeserver_url }}
ExecStop=-{{ matrix_host_command_docker }} kill matrix-heisenbridge ExecStop=-{{ devture_systemd_docker_base_host_command_docker }} kill matrix-heisenbridge
ExecStop=-{{ matrix_host_command_docker }} rm matrix-heisenbridge ExecStop=-{{ devture_systemd_docker_base_host_command_docker }} rm matrix-heisenbridge
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-heisenbridge SyslogIdentifier=matrix-heisenbridge

View file

@ -129,8 +129,8 @@ matrix_hookshot_generic_user_id_prefix: '_webhooks_'
matrix_hookshot_feeds_enabled: true matrix_hookshot_feeds_enabled: true
matrix_hookshot_feeds_pollIntervalSeconds: 600 # no-qa var-naming matrix_hookshot_feeds_pollIntervalSeconds: 600 # noqa var-naming
matrix_hookshot_feeds_pollTimeoutSeconds: 10 # no-qa var-naming matrix_hookshot_feeds_pollTimeoutSeconds: 10 # noqa var-naming
# There is no need to edit ports. use matrix_hookshot_container_http_host_bind_ports below to expose ports instead. # There is no need to edit ports. use matrix_hookshot_container_http_host_bind_ports below to expose ports instead.

View file

@ -22,8 +22,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_hookshot_docker_image_force_pull }}" 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 when: not matrix_hookshot_container_image_self_build
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure hookshot repository is present on self-build - name: Ensure hookshot repository is present on self-build
@ -71,7 +71,7 @@
- name: Validate hookshot config.yml - name: Validate hookshot config.yml
ansible.builtin.command: ansible.builtin.command:
cmd: | cmd: |
{{ matrix_host_command_docker }} run {{ devture_systemd_docker_base_host_command_docker }} run
--rm --rm
--name={{ matrix_hookshot_container_url }}-validate --name={{ matrix_hookshot_container_url }}-validate
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} --user={{ matrix_user_uid }}:{{ matrix_user_gid }}
@ -106,7 +106,7 @@
- name: Ensure matrix-hookshot.service installed - name: Ensure matrix-hookshot.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-hookshot.service.j2" 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 mode: 0644
register: matrix_hookshot_systemd_service_result register: matrix_hookshot_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-hookshot service - name: Check existence of matrix-hookshot service
ansible.builtin.stat: 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 register: matrix_hookshot_service_stat
- name: Ensure matrix-hookshot is stopped - name: Ensure matrix-hookshot is stopped
@ -15,7 +15,7 @@
- name: Ensure matrix-hookshot.service doesn't exist - name: Ensure matrix-hookshot.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-hookshot.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-hookshot.service"
state: absent state: absent
when: "matrix_hookshot_service_stat.stat.exists" when: "matrix_hookshot_service_stat.stat.exists"

View file

@ -12,11 +12,11 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_docker }} kill {{ matrix_hookshot_container_url }} ExecStartPre=-{{ devture_systemd_docker_base_host_command_docker }} kill {{ matrix_hookshot_container_url }}
ExecStartPre=-{{ matrix_host_command_docker }} rm {{ 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -30,8 +30,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name {{ matrix_hookshot_co
{% endfor %} {% endfor %}
{{ matrix_hookshot_docker_image }} {{ matrix_hookshot_docker_image }}
ExecStop=-{{ matrix_host_command_docker }} kill {{ matrix_hookshot_container_url }} ExecStop=-{{ devture_systemd_docker_base_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 }} rm {{ matrix_hookshot_container_url }}
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier={{ matrix_hookshot_container_url }} SyslogIdentifier={{ matrix_hookshot_container_url }}

View file

@ -59,8 +59,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_discord_docker_image_force_pull }}" 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 when: not matrix_mautrix_discord_container_image_self_build
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure Mautrix discord repository is present on self-build - name: Ensure Mautrix discord repository is present on self-build
@ -105,7 +105,7 @@
- name: Ensure matrix-mautrix-discord.service installed - name: Ensure matrix-mautrix-discord.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-mautrix-discord.service.j2" 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 mode: 0644
register: matrix_mautrix_discord_systemd_service_result register: matrix_mautrix_discord_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-mautrix-discord service - name: Check existence of matrix-mautrix-discord service
ansible.builtin.stat: 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 register: matrix_mautrix_discord_service_stat
- name: Ensure matrix-mautrix-discord is stopped - name: Ensure matrix-mautrix-discord is stopped
@ -15,7 +15,7 @@
- name: Ensure matrix-mautrix-discord.service doesn't exist - name: Ensure matrix-mautrix-discord.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-mautrix-discord.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-discord.service"
state: absent state: absent
when: "matrix_mautrix_discord_service_stat.stat.exists" when: "matrix_mautrix_discord_service_stat.stat.exists"

View file

@ -12,14 +12,14 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -33,8 +33,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-discor
{{ matrix_mautrix_discord_docker_image }} \ {{ matrix_mautrix_discord_docker_image }} \
/usr/bin/mautrix-discord -c /config/config.yaml -r /config/registration.yaml --no-update /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=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_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 }} rm matrix-mautrix-discord 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-mautrix-discord SyslogIdentifier=matrix-mautrix-discord

View file

@ -44,8 +44,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_facebook_docker_image_force_pull }}" 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 when: not matrix_mautrix_facebook_container_image_self_build
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure Mautrix Facebook paths exist - name: Ensure Mautrix Facebook paths exist
@ -122,7 +122,7 @@
- name: Ensure matrix-mautrix-facebook.service installed - name: Ensure matrix-mautrix-facebook.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-mautrix-facebook.service.j2" 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 mode: 0644
register: matrix_mautrix_facebook_systemd_service_result register: matrix_mautrix_facebook_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-mautrix-facebook service - name: Check existence of matrix-mautrix-facebook service
ansible.builtin.stat: 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 register: matrix_mautrix_facebook_service_stat
- name: Ensure matrix-mautrix-facebook is stopped - name: Ensure matrix-mautrix-facebook is stopped
@ -15,7 +15,7 @@
- name: Ensure matrix-mautrix-facebook.service doesn't exist - name: Ensure matrix-mautrix-facebook.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-mautrix-facebook.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-facebook.service"
state: absent state: absent
when: "matrix_mautrix_facebook_service_stat.stat.exists" when: "matrix_mautrix_facebook_service_stat.stat.exists"

View file

@ -14,9 +14,9 @@
block: block:
- name: Inject warning if on an old SQLite-supporting version - name: Inject warning if on an old SQLite-supporting version
ansible.builtin.set_fact: 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)" "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)"

View file

@ -12,14 +12,14 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -35,8 +35,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-facebo
{{ matrix_mautrix_facebook_docker_image }} \ {{ matrix_mautrix_facebook_docker_image }} \
python3 -m mautrix_facebook -c /config/config.yaml --no-update 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=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_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 }} rm matrix-mautrix-facebook 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-mautrix-facebook SyslogIdentifier=matrix-mautrix-facebook

View file

@ -44,8 +44,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_googlechat_docker_image_force_pull }}" 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 when: not matrix_mautrix_googlechat_container_image_self_build
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure Mautrix googlechat paths exist - name: Ensure Mautrix googlechat paths exist
@ -122,7 +122,7 @@
- name: Ensure matrix-mautrix-googlechat.service installed - name: Ensure matrix-mautrix-googlechat.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-mautrix-googlechat.service.j2" 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 mode: 0644
register: matrix_mautrix_googlechat_systemd_service_result register: matrix_mautrix_googlechat_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-mautrix-googlechat service - name: Check existence of matrix-mautrix-googlechat service
ansible.builtin.stat: 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 register: matrix_mautrix_googlechat_service_stat
- name: Ensure matrix-mautrix-googlechat is stopped - name: Ensure matrix-mautrix-googlechat is stopped
@ -15,7 +15,7 @@
- name: Ensure matrix-mautrix-googlechat.service doesn't exist - name: Ensure matrix-mautrix-googlechat.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-mautrix-googlechat.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-googlechat.service"
state: absent state: absent
when: "matrix_mautrix_googlechat_service_stat.stat.exists" when: "matrix_mautrix_googlechat_service_stat.stat.exists"

View file

@ -12,12 +12,12 @@ DefaultDependencies=no
[Service] [Service]
Type=simple 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. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -33,8 +33,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-google
{{ matrix_mautrix_googlechat_docker_image }} \ {{ matrix_mautrix_googlechat_docker_image }} \
python3 -m mautrix_googlechat -c /config/config.yaml --no-update 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=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_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 }} rm matrix-mautrix-googlechat 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-mautrix-googlechat SyslogIdentifier=matrix-mautrix-googlechat

View file

@ -44,8 +44,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_hangouts_docker_image_force_pull }}" 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 when: not matrix_mautrix_hangouts_container_image_self_build
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure Mautrix Hangouts paths exist - name: Ensure Mautrix Hangouts paths exist
@ -122,7 +122,7 @@
- name: Ensure matrix-mautrix-hangouts.service installed - name: Ensure matrix-mautrix-hangouts.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-mautrix-hangouts.service.j2" 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 mode: 0644
register: matrix_mautrix_hangouts_systemd_service_result register: matrix_mautrix_hangouts_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-mautrix-hangouts service - name: Check existence of matrix-mautrix-hangouts service
ansible.builtin.stat: 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 register: matrix_mautrix_hangouts_service_stat
- name: Ensure matrix-mautrix-hangouts is stopped - name: Ensure matrix-mautrix-hangouts is stopped
@ -15,7 +15,7 @@
- name: Ensure matrix-mautrix-hangouts.service doesn't exist - name: Ensure matrix-mautrix-hangouts.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-mautrix-hangouts.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-hangouts.service"
state: absent state: absent
when: "matrix_mautrix_hangouts_service_stat.stat.exists" when: "matrix_mautrix_hangouts_service_stat.stat.exists"

View file

@ -12,10 +12,10 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_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=-{{ 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=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm 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={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-hangouts-db \ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-mautrix-hangouts-db \
--log-driver=none \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --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. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -44,8 +44,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-hangou
{{ matrix_mautrix_hangouts_docker_image }} \ {{ matrix_mautrix_hangouts_docker_image }} \
python3 -m mautrix_hangouts -c /config/config.yaml --no-update 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=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_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 }} rm matrix-mautrix-hangouts 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-mautrix-hangouts SyslogIdentifier=matrix-mautrix-hangouts

View file

@ -15,8 +15,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_instagram_docker_image_force_pull }}" 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 when: not matrix_mautrix_instagram_container_image_self_build
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure Mautrix instagram paths exist - name: Ensure Mautrix instagram paths exist
@ -75,7 +75,7 @@
- name: Ensure matrix-mautrix-instagram.service installed - name: Ensure matrix-mautrix-instagram.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-mautrix-instagram.service.j2" 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 mode: 0644
register: matrix_mautrix_instagram_systemd_service_result register: matrix_mautrix_instagram_systemd_service_result

View file

@ -1,7 +1,7 @@
--- ---
- name: Check existence of matrix-mautrix-instagram service - name: Check existence of matrix-mautrix-instagram service
ansible.builtin.stat: 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 register: matrix_mautrix_instagram_service_stat
- name: Ensure matrix-mautrix-instagram is stopped - name: Ensure matrix-mautrix-instagram is stopped
@ -14,7 +14,7 @@
- name: Ensure matrix-mautrix-instagram.service doesn't exist - name: Ensure matrix-mautrix-instagram.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-mautrix-instagram.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-instagram.service"
state: absent state: absent
when: "matrix_mautrix_instagram_service_stat.stat.exists" when: "matrix_mautrix_instagram_service_stat.stat.exists"

View file

@ -12,14 +12,14 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_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 }} 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' 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. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 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 \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -32,8 +32,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-instag
{{ matrix_mautrix_instagram_docker_image }} \ {{ matrix_mautrix_instagram_docker_image }} \
python3 -m mautrix_instagram -c /config/config.yaml --no-update 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=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_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 }} rm matrix-mautrix-instagram 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-mautrix-instagram SyslogIdentifier=matrix-mautrix-instagram

View file

@ -16,8 +16,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_signal_docker_image_force_pull }}" 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" when: "not matrix_mautrix_signal_container_image_self_build | bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
@ -120,14 +120,14 @@
- name: Ensure matrix-mautrix-signal-daemon.service installed - name: Ensure matrix-mautrix-signal-daemon.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-mautrix-signal-daemon.service.j2" 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 mode: 0644
register: matrix_mautrix_signal_daemon_systemd_service_result register: matrix_mautrix_signal_daemon_systemd_service_result
- name: Ensure matrix-mautrix-signal.service installed - name: Ensure matrix-mautrix-signal.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-mautrix-signal.service.j2" 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 mode: 0644
register: matrix_mautrix_signal_systemd_service_result register: matrix_mautrix_signal_systemd_service_result

View file

@ -3,7 +3,7 @@
# Signal daemon service # Signal daemon service
- name: Check existence of matrix-mautrix-signal-daemon service - name: Check existence of matrix-mautrix-signal-daemon service
ansible.builtin.stat: 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 register: matrix_mautrix_signal_daemon_service_stat
- name: Ensure matrix-mautrix-signal-daemon is stopped - name: Ensure matrix-mautrix-signal-daemon is stopped
@ -16,14 +16,14 @@
- name: Ensure matrix-mautrix-signal-daemon.service doesn't exist - name: Ensure matrix-mautrix-signal-daemon.service doesn't exist
ansible.builtin.file: 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 state: absent
when: "matrix_mautrix_signal_daemon_service_stat.stat.exists" when: "matrix_mautrix_signal_daemon_service_stat.stat.exists"
# Bridge service # Bridge service
- name: Check existence of matrix-mautrix-signal service - name: Check existence of matrix-mautrix-signal service
ansible.builtin.stat: 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 register: matrix_mautrix_signal_service_stat
- name: Ensure matrix-mautrix-signal is stopped - name: Ensure matrix-mautrix-signal is stopped
@ -36,7 +36,7 @@
- name: Ensure matrix-mautrix-signal.service doesn't exist - name: Ensure matrix-mautrix-signal.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-mautrix-signal.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-signal.service"
state: absent state: absent
when: "matrix_mautrix_signal_service_stat.stat.exists" when: "matrix_mautrix_signal_service_stat.stat.exists"

View file

@ -13,16 +13,16 @@ Wants={{ service }}
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-signal-daemon 2>/dev/null || true' ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-signal-daemon 2>/dev/null || true'
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-signal-daemon 2>/dev/null || true' ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-signal-daemon 2>/dev/null || true'
# Intentional delay, so that the homeserver (we likely depend on) can manage to start. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 ExecStartPre={{ matrix_host_command_sleep }} 5
# Migration task required by the 0.19.0 upgrade # Migration task required by the 0.19.0 upgrade
ExecStartPre=-{{ matrix_host_command_docker }} run --rm --name matrix-mautrix-signal-daemon \ ExecStartPre=-{{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-mautrix-signal-daemon \
--log-driver=none \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -32,7 +32,7 @@ ExecStartPre=-{{ matrix_host_command_docker }} run --rm --name matrix-mautrix-si
--migrate-data --migrate-data
# We can't use `--read-only` for this bridge. # We can't use `--read-only` for this bridge.
ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-signal-daemon \ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-mautrix-signal-daemon \
--log-driver=none \ --log-driver=none \
--env-file={{ matrix_mautrix_signal_daemon_path }}/env \ --env-file={{ matrix_mautrix_signal_daemon_path }}/env \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
@ -41,8 +41,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-signal
-v {{ matrix_mautrix_signal_daemon_path }}:/signald:z \ -v {{ matrix_mautrix_signal_daemon_path }}:/signald:z \
{{ matrix_mautrix_signal_daemon_docker_image }} {{ matrix_mautrix_signal_daemon_docker_image }}
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-signal-daemon 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-signal-daemon 2>/dev/null || true'
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-signal-daemon 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-signal-daemon 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30

View file

@ -13,14 +13,14 @@ Wants={{ service }}
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-signal 2>/dev/null || true' ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-signal 2>/dev/null || true'
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-signal 2>/dev/null || true' ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-signal 2>/dev/null || true'
# Intentional delay, so that the homeserver (we likely depend on) can manage to start. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 ExecStartPre={{ matrix_host_command_sleep }} 5
ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-signal \ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-mautrix-signal \
--log-driver=none \ --log-driver=none \
--network={{ matrix_docker_network }} \ --network={{ matrix_docker_network }} \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
@ -38,8 +38,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-signal
{{ matrix_mautrix_signal_docker_image }} \ {{ matrix_mautrix_signal_docker_image }} \
python3 -m mautrix_signal -c /config/config.yaml --no-update python3 -m mautrix_signal -c /config/config.yaml --no-update
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-signal 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-signal 2>/dev/null || true'
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-signal 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-signal 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30

View file

@ -58,8 +58,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_telegram_docker_image_force_pull }}" force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_telegram_docker_image_force_pull }}"
when: "not matrix_mautrix_telegram_container_image_self_build | bool" when: "not matrix_mautrix_telegram_container_image_self_build | bool"
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure lottieconverter is present when self-building - name: Ensure lottieconverter is present when self-building
@ -147,7 +147,7 @@
- name: Ensure matrix-mautrix-telegram.service installed - name: Ensure matrix-mautrix-telegram.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-mautrix-telegram.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mautrix-telegram.service.j2"
dest: "{{ matrix_systemd_path }}/matrix-mautrix-telegram.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-telegram.service"
mode: 0644 mode: 0644
register: matrix_mautrix_telegram_systemd_service_result register: matrix_mautrix_telegram_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-mautrix-telegram service - name: Check existence of matrix-mautrix-telegram service
ansible.builtin.stat: ansible.builtin.stat:
path: "{{ matrix_systemd_path }}/matrix-mautrix-telegram.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-telegram.service"
register: matrix_mautrix_telegram_service_stat register: matrix_mautrix_telegram_service_stat
- name: Ensure matrix-mautrix-telegram is stopped - name: Ensure matrix-mautrix-telegram is stopped
@ -15,7 +15,7 @@
- name: Ensure matrix-mautrix-telegram.service doesn't exist - name: Ensure matrix-mautrix-telegram.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-mautrix-telegram.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-telegram.service"
state: absent state: absent
when: "matrix_mautrix_telegram_service_stat.stat.exists" when: "matrix_mautrix_telegram_service_stat.stat.exists"

View file

@ -12,14 +12,14 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-telegram 2>/dev/null || true' ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-telegram 2>/dev/null || true'
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-telegram 2>/dev/null || true' ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-telegram 2>/dev/null || true'
# Intentional delay, so that the homeserver (we likely depend on) can manage to start. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 ExecStartPre={{ matrix_host_command_sleep }} 5
ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-telegram \ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-mautrix-telegram \
--log-driver=none \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -35,8 +35,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-telegr
{{ matrix_mautrix_telegram_docker_image }} \ {{ matrix_mautrix_telegram_docker_image }} \
python3 -m mautrix_telegram -c /config/config.yaml --no-update python3 -m mautrix_telegram -c /config/config.yaml --no-update
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-telegram 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-telegram 2>/dev/null || true'
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-telegram 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-telegram 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-mautrix-telegram SyslogIdentifier=matrix-mautrix-telegram

View file

@ -19,8 +19,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_twitter_docker_image_force_pull }}" force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_twitter_docker_image_force_pull }}"
when: matrix_mautrix_twitter_enabled | bool and not matrix_mautrix_twitter_container_image_self_build when: matrix_mautrix_twitter_enabled | bool and not matrix_mautrix_twitter_container_image_self_build
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure Mautrix Twitter paths exist - name: Ensure Mautrix Twitter paths exist
@ -78,7 +78,7 @@
- name: Ensure matrix-mautrix-twitter.service installed - name: Ensure matrix-mautrix-twitter.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-mautrix-twitter.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mautrix-twitter.service.j2"
dest: "{{ matrix_systemd_path }}/matrix-mautrix-twitter.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-twitter.service"
mode: 0644 mode: 0644
register: matrix_mautrix_twitter_systemd_service_result register: matrix_mautrix_twitter_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-mautrix-twitter service - name: Check existence of matrix-mautrix-twitter service
ansible.builtin.stat: ansible.builtin.stat:
path: "{{ matrix_systemd_path }}/matrix-mautrix-twitter.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-twitter.service"
register: matrix_mautrix_twitter_service_stat register: matrix_mautrix_twitter_service_stat
- name: Ensure matrix-mautrix-twitter is stopped - name: Ensure matrix-mautrix-twitter is stopped
@ -14,7 +14,7 @@
- name: Ensure matrix-mautrix-twitter.service doesn't exist - name: Ensure matrix-mautrix-twitter.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-mautrix-twitter.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-twitter.service"
state: absent state: absent
when: "matrix_mautrix_twitter_service_stat.stat.exists" when: "matrix_mautrix_twitter_service_stat.stat.exists"

View file

@ -12,14 +12,14 @@ DefaultDependencies=no
[Service] [Service]
Type=simple Type=simple
Environment="HOME={{ matrix_systemd_unit_home_path }}" Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-twitter 2>/dev/null || true' ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-twitter 2>/dev/null || true'
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-twitter 2>/dev/null || true' ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-twitter 2>/dev/null || true'
# Intentional delay, so that the homeserver (we likely depend on) can manage to start. # Intentional delay, so that the homeserver (we likely depend on) can manage to start.
ExecStartPre={{ matrix_host_command_sleep }} 5 ExecStartPre={{ matrix_host_command_sleep }} 5
ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-twitter \ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name matrix-mautrix-twitter \
--log-driver=none \ --log-driver=none \
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
--cap-drop=ALL \ --cap-drop=ALL \
@ -32,8 +32,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-mautrix-twitte
{{ matrix_mautrix_twitter_docker_image }} \ {{ matrix_mautrix_twitter_docker_image }} \
python3 -m mautrix_twitter -c /config/config.yaml --no-update python3 -m mautrix_twitter -c /config/config.yaml --no-update
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-mautrix-twitter 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} kill matrix-mautrix-twitter 2>/dev/null || true'
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-mautrix-twitter 2>/dev/null || true' ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-mautrix-twitter 2>/dev/null || true'
Restart=always Restart=always
RestartSec=30 RestartSec=30
SyslogIdentifier=matrix-mautrix-twitter SyslogIdentifier=matrix-mautrix-twitter

View file

@ -59,8 +59,8 @@
force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_whatsapp_docker_image_force_pull }}" force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_whatsapp_docker_image_force_pull }}"
when: not matrix_mautrix_whatsapp_container_image_self_build when: not matrix_mautrix_whatsapp_container_image_self_build
register: result register: result
retries: "{{ matrix_container_retries_count }}" retries: "{{ devture_playbook_help_container_retries_count }}"
delay: "{{ matrix_container_retries_delay }}" delay: "{{ devture_playbook_help_container_retries_delay }}"
until: result is not failed until: result is not failed
- name: Ensure Mautrix Whatsapp repository is present on self-build - name: Ensure Mautrix Whatsapp repository is present on self-build
@ -132,7 +132,7 @@
- name: Ensure matrix-mautrix-whatsapp.service installed - name: Ensure matrix-mautrix-whatsapp.service installed
ansible.builtin.template: ansible.builtin.template:
src: "{{ role_path }}/templates/systemd/matrix-mautrix-whatsapp.service.j2" src: "{{ role_path }}/templates/systemd/matrix-mautrix-whatsapp.service.j2"
dest: "{{ matrix_systemd_path }}/matrix-mautrix-whatsapp.service" dest: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-whatsapp.service"
mode: 0644 mode: 0644
register: matrix_mautrix_whatsapp_systemd_service_result register: matrix_mautrix_whatsapp_systemd_service_result

View file

@ -2,7 +2,7 @@
- name: Check existence of matrix-mautrix-whatsapp service - name: Check existence of matrix-mautrix-whatsapp service
ansible.builtin.stat: ansible.builtin.stat:
path: "{{ matrix_systemd_path }}/matrix-mautrix-whatsapp.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-whatsapp.service"
register: matrix_mautrix_whatsapp_service_stat register: matrix_mautrix_whatsapp_service_stat
- name: Ensure matrix-mautrix-whatsapp is stopped - name: Ensure matrix-mautrix-whatsapp is stopped
@ -15,7 +15,7 @@
- name: Ensure matrix-mautrix-whatsapp.service doesn't exist - name: Ensure matrix-mautrix-whatsapp.service doesn't exist
ansible.builtin.file: ansible.builtin.file:
path: "{{ matrix_systemd_path }}/matrix-mautrix-whatsapp.service" path: "{{ devture_systemd_docker_base_systemd_path }}/matrix-mautrix-whatsapp.service"
state: absent state: absent
when: "matrix_mautrix_whatsapp_service_stat.stat.exists" when: "matrix_mautrix_whatsapp_service_stat.stat.exists"

Some files were not shown because too many files have changed in this diff Show more