mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Add matrix, plex and deluge
This commit is contained in:
parent
643ab3229a
commit
b09ac86a62
24 changed files with 390 additions and 1 deletions
24
roles/matrix-docker/tasks/main.yml
Normal file
24
roles/matrix-docker/tasks/main.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
- name: Copy matrix docker files
|
||||
copy:
|
||||
src: matrix
|
||||
dest: "{{docker_compose_files_folder}}"
|
||||
- name: Create matrix-network docker network
|
||||
docker_network:
|
||||
name: matrix-network
|
||||
- name: Start matrix docker project
|
||||
docker_service:
|
||||
project_src: "{{docker_compose_files_folder}}/matrix"
|
||||
state: present
|
||||
- name: Check if database tables exist
|
||||
command: docker-compose exec -T db psql -U synapse synapse -c "\dt"
|
||||
args:
|
||||
chdir: "{{docker_compose_files_folder}}/matrix/"
|
||||
register: db_tables_exist
|
||||
ignore_errors: false
|
||||
changed_when: '"No relations found." in db_tables_exist.stdout_lines'
|
||||
- name: Restore Matrix database
|
||||
command: docker-compose exec -T db sh -c "psql -U synapse synapse < /backups/database.dmp"
|
||||
args:
|
||||
chdir: "{{docker_compose_files_folder}}/matrix/"
|
||||
when: '"No relations found." in db_tables_exist.stdout_lines'
|
||||
Loading…
Add table
Add a link
Reference in a new issue