3
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2026-01-05 15:40:24 +00:00

Add Matrix.to (#4750)

This commit is contained in:
Suguru Hirahara
2025-11-23 04:53:37 +00:00
committed by GitHub
parent 7181131967
commit 6cc837600a
15 changed files with 633 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
# SPDX-FileCopyrightText: 2023 Slavi Pantaleev
# SPDX-FileCopyrightText: 2025 Suguru Hirahara
#
# SPDX-License-Identifier: AGPL-3.0-or-later
---
- name: Check existence of Matrix.to systemd service
ansible.builtin.stat:
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ matrix_matrixto_identifier }}.service"
register: matrix_matrixto_service_stat
- name: Uninstall Matrix.to systemd services and files
when: matrix_matrixto_service_stat.stat.exists | bool
block:
- name: Ensure Matrix.to systemd service is stopped
ansible.builtin.service:
name: "{{ matrix_matrixto_identifier }}"
state: stopped
enabled: false
daemon_reload: true
- name: Ensure Matrix.to systemd service does not exist
ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ matrix_matrixto_identifier }}.service"
state: absent
- name: Ensure Matrix.to container network does not exist via community.docker.docker_network
when: devture_systemd_docker_base_container_network_creation_method == 'ansible-module'
community.docker.docker_network:
name: "{{ matrix_matrixto_container_network }}"
state: absent
- name: Ensure Matrix.to container network does not exist via ansible.builtin.command
when: devture_systemd_docker_base_container_network_creation_method == 'command'
ansible.builtin.command:
cmd: >-
{{ devture_systemd_docker_base_host_command_docker }} network rm
{{ matrix_matrixto_container_network }}
register: network_deletion_result
changed_when: matrix_matrixto_container_network in network_deletion_result.stdout
- name: Ensure Matrix.to path does not exist
ansible.builtin.file:
path: "{{ matrix_matrixto_base_path }}"
state: absent