Make changes according to feedback

Co-authored-by: Slavi Pantaleev <slavi@devture.com>

Update group_vars/matrix_servers

Co-authored-by: Slavi Pantaleev <slavi@devture.com>

Remove old data migration tasks

Co-authored-by: Slavi Pantaleev <slavi@devture.com>

Update roles/matrix-bridge-mautrix-discord/tasks/validate_config.yml

Co-authored-by: Slavi Pantaleev <slavi@devture.com>

Redo bridge permissions
This commit is contained in:
MdotAmaan
2022-07-28 22:14:45 +04:00
committed by MdotAmaan
parent 8621ff1379
commit 6fb961eb12
7 changed files with 19 additions and 52 deletions

View File

@ -87,33 +87,6 @@
pull: true
when: "matrix_mautrix_discord_container_image_self_build | bool"
- name: Check if an old database file exists
ansible.builtin.stat:
path: "{{ matrix_mautrix_discord_base_path }}/mautrix-discord.db"
register: matrix_mautrix_discord_stat_database
- name: Check if an old matrix state file exists
ansible.builtin.stat:
path: "{{ matrix_mautrix_discord_base_path }}/mx-state.json"
register: matrix_mautrix_discord_stat_mx_state
- name: (Data relocation) Ensure matrix-mautrix-discord.service is stopped
ansible.builtin.service:
name: matrix-mautrix-discord
state: stopped
enabled: false
daemon_reload: true
failed_when: false
when: "matrix_mautrix_discord_stat_database.stat.exists"
- name: (Data relocation) Move mautrix-discord database file to ./data directory
ansible.builtin.command: "mv {{ matrix_mautrix_discord_base_path }}/mautrix-discord.db {{ matrix_mautrix_discord_data_path }}/mautrix-discord.db"
when: "matrix_mautrix_discord_stat_database.stat.exists"
- name: (Data relocation) Move mautrix-discord mx-state file to ./data directory
ansible.builtin.command: "mv {{ matrix_mautrix_discord_base_path }}/mx-state.json {{ matrix_mautrix_discord_data_path }}/mx-state.json"
when: "matrix_mautrix_discord_stat_mx_state.stat.exists"
- name: Ensure mautrix-discord config.yaml installed
ansible.builtin.copy:
content: "{{ matrix_mautrix_discord_configuration | to_nice_yaml(indent=2, width=999999) }}"

View File

@ -8,13 +8,3 @@
with_items:
- "matrix_mautrix_discord_appservice_token"
- "matrix_mautrix_discord_homeserver_token"
- name: (Deprecation) Catch and report renamed settings
ansible.builtin.fail:
msg: >-
Your configuration contains a variable, which now has a different name.
Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
when: "item.old in vars"
with_items:
- {'old': 'matrix_mautrix_discord_log_level', 'new': 'matrix_mautrix_discord_logging_level'}