-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for matrix_encryption_disabler
Related to matrix-org/synapse#4401 Fixes #1621
- Loading branch information
1 parent
85c66a9
commit f64d3f8
Showing
5 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
|
||
- import_tasks: "{{ role_path }}/tasks/ext/encryption-disabler/setup_install.yml" | ||
when: matrix_synapse_ext_encryption_disabler_enabled|bool | ||
|
||
- import_tasks: "{{ role_path }}/tasks/ext/encryption-disabler/setup_uninstall.yml" | ||
when: "not matrix_synapse_ext_encryption_disabler_enabled|bool" |
33 changes: 33 additions & 0 deletions
33
roles/matrix-synapse/tasks/ext/encryption-disabler/setup_install.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
|
||
- name: Download matrix_encryption_disabler | ||
get_url: | ||
url: "{{ matrix_synapse_ext_encryption_disabler_download_url }}" | ||
dest: "{{ matrix_synapse_ext_path }}/matrix_e2ee_filter.py" | ||
force: true | ||
mode: 0440 | ||
owner: "{{ matrix_user_username }}" | ||
group: "{{ matrix_user_groupname }}" | ||
|
||
- set_fact: | ||
matrix_synapse_modules: | | ||
{{ | ||
matrix_synapse_modules|default([]) | ||
+ | ||
[ | ||
{ | ||
"module": "matrix_e2ee_filter.EncryptedRoomFilter", | ||
"config": matrix_synapse_ext_encryption_config | ||
} | ||
] | ||
}} | ||
matrix_synapse_container_extra_arguments: > | ||
{{ matrix_synapse_container_extra_arguments|default([]) }} | ||
+ | ||
["--mount type=bind,src={{ matrix_synapse_ext_path }}/matrix_e2ee_filter.py,dst={{ matrix_synapse_in_container_python_packages_path }}/matrix_e2ee_filter.py,ro"] | ||
matrix_synapse_additional_loggers: > | ||
{{ matrix_synapse_additional_loggers }} | ||
+ | ||
{{ [{'name': 'matrix_e2ee_filter', 'level': 'INFO'}] }} |
6 changes: 6 additions & 0 deletions
6
roles/matrix-synapse/tasks/ext/encryption-disabler/setup_uninstall.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
|
||
- name: Ensure matrix_encryption_disabler doesn't exist | ||
file: | ||
path: "{{ matrix_synapse_ext_path }}/matrix_e2ee_filter.py" | ||
state: absent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters