mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-10-07 23:14:58 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
37
roles/matrix_ma1sd/tasks/migrate_mxisd.yml
Normal file
37
roles/matrix_ma1sd/tasks/migrate_mxisd.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
|
||||
- name: Stop mxisd service
|
||||
service: name=matrix-mxisd state=stopped
|
||||
tags: matrix
|
||||
|
||||
- name: Reload systemd
|
||||
systemd: daemon_reload=True
|
||||
tags: matrix
|
||||
|
||||
- name: Migrate database
|
||||
copy: src=/opt/matrix/mxisd/db/mxisd.sqlite dest={{ ma1sd_root_dir }}/db/ma1sd.sqlite owner={{ ma1sd_user }} group={{ ma1sd_user }} mode=0640 remote_src=True
|
||||
when: not ma1sd_sqlite.stat.exists
|
||||
tags: matrix
|
||||
|
||||
- name: Migration signing keys
|
||||
copy: src=/opt/matrix/mxisd/etc/signing.key dest={{ ma1sd_root_dir }}/etc/ owner={{ ma1sd_user }} group={{ ma1sd_user }} mode=0750 remote_src=True
|
||||
when: not ma1sd_signingkey.stat.exists
|
||||
tags: matrix
|
||||
|
||||
- name: Remove iptables rules
|
||||
iptables_raw:
|
||||
name: mxisd_port
|
||||
state: absent
|
||||
when: iptables_manage | default(True)
|
||||
tags: matrix
|
||||
|
||||
- name: Remove mxisd files
|
||||
file: path={{ item }} state=absent
|
||||
loop:
|
||||
- /etc/systemd/system/matrix-mxisd.service
|
||||
- /opt/matrix/mxisd
|
||||
tags: matrix
|
||||
|
||||
- name: Remove mxisd user
|
||||
user: name=mxisd state=absent
|
||||
tags: matrix
|
Reference in New Issue
Block a user