| @@ -8,11 +8,11 @@ Use the following playbook configuration: | |||||
| ```yaml | ```yaml | ||||
| matrix_mautrix_wsproxy_enabled: true | matrix_mautrix_wsproxy_enabled: true | ||||
| matrix_mautrix_androidsms_appservice_token: 'random string' | |||||
| matrix_mautrix_androidsms_homeserver_token: 'random string' | |||||
| matrix_mautrix_imessage_appservice_token: 'random string' | |||||
| matrix_mautrix_imessage_homeserver_token: 'random string' | |||||
| matrix_mautrix_wsproxy_syncproxy_shared_secret: 'random string' | |||||
| matrix_mautrix_androidsms_appservice_token: 'secret token from bridge' | |||||
| matrix_mautrix_androidsms_homeserver_token: 'secret token from bridge' | |||||
| matrix_mautrix_imessage_appservice_token: 'secret token from bridge' | |||||
| matrix_mautrix_imessage_homeserver_token: 'secret token from bridge' | |||||
| matrix_mautrix_wsproxy_syncproxy_shared_secret: 'secret token from bridge' | |||||
| ``` | ``` | ||||
| Note that the tokens must match what is compiled into the `mautrix-imessage` bridge running on Mac and Android. | Note that the tokens must match what is compiled into the `mautrix-imessage` bridge running on Mac and Android. | ||||
| @@ -14,6 +14,15 @@ | |||||
| - ansible.builtin.set_fact: | - ansible.builtin.set_fact: | ||||
| matrix_mautrix_wsproxy_syncproxy_requires_restart: false | matrix_mautrix_wsproxy_syncproxy_requires_restart: false | ||||
| - name: Ensure Mautrix wsproxy support files installed | |||||
| ansible.builtin.template: | |||||
| src: "{{ role_path }}/templates/{{ item }}.j2" | |||||
| dest: "{{ matrix_mautrix_wsproxy_base_path }}/{{ item }}" | |||||
| mode: 0640 | |||||
| owner: "{{ matrix_user_username }}" | |||||
| group: "{{ matrix_user_groupname }}" | |||||
| with_items: | |||||
| - syncproxy-env | |||||
| - name: Ensure Mautrix wsproxy image is pulled | - name: Ensure Mautrix wsproxy image is pulled | ||||
| community.docker.docker_image: | community.docker.docker_image: | ||||
| name: "{{ matrix_mautrix_wsproxy_docker_image }}" | name: "{{ matrix_mautrix_wsproxy_docker_image }}" | ||||
| @@ -0,0 +1,3 @@ | |||||
| DATABASE_URL={{ matrix_mautrix_signal_wsproxy_syncproxy_connection_string }} | |||||
| HOMESERVER_URL={{ matrix_homeserver_container_url }} | |||||
| SHARED_SECRET={{ matrix_mautrix_wsproxy_syncproxy_shared_secret }} | |||||
| @@ -24,10 +24,10 @@ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name | |||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| --cap-drop=ALL \ | --cap-drop=ALL \ | ||||
| --network={{ matrix_docker_network }} \ | --network={{ matrix_docker_network }} \ | ||||
| {% if matrix_mautrix_wsproxy_syncproxy_bind_port %} | |||||
| -p {{ matrix_mautrix_wsproxy_syncproxy_port }}:29331 \ | -p {{ matrix_mautrix_wsproxy_syncproxy_port }}:29331 \ | ||||
| -e DATABASE_URL={{ matrix_mautrix_signal_wsproxy_syncproxy_connection_string }} \ | |||||
| -e HOMESERVER_URL={{ matrix_homeserver_container_url }} \ | |||||
| -e SHARED_SECRET={{ matrix_mautrix_wsproxy_syncproxy_shared_secret }} \ | |||||
| {% endif %} | |||||
| --env-file={{ matrix_mautrix_wsproxy_base_path }}/syncproxy-env \ | |||||
| {% for arg in matrix_mautrix_wsproxy_syncproxy_container_extra_arguments %} | {% for arg in matrix_mautrix_wsproxy_syncproxy_container_extra_arguments %} | ||||
| {{ arg }} \ | {{ arg }} \ | ||||
| {% endfor %} | {% endfor %} | ||||
| @@ -24,8 +24,10 @@ ExecStart={{ devture_systemd_docker_base_host_command_docker }} run --rm --name | |||||
| --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ | ||||
| --cap-drop=ALL \ | --cap-drop=ALL \ | ||||
| --network={{ matrix_docker_network }} \ | --network={{ matrix_docker_network }} \ | ||||
| -v {{ matrix_mautrix_wsproxy_config_path }}:/data:z \ | |||||
| {% if matrix_mautrix_wsproxy_bind_port %} | |||||
| -p {{ matrix_mautrix_wsproxy_port }}:29331 \ | -p {{ matrix_mautrix_wsproxy_port }}:29331 \ | ||||
| {% endif %} | |||||
| --mount type=bind,src={{ matrix_mautrix_wsproxy_config_path }},dst=/data:z \ | |||||
| {% for arg in matrix_mautrix_wsproxy_container_extra_arguments %} | {% for arg in matrix_mautrix_wsproxy_container_extra_arguments %} | ||||
| {{ arg }} \ | {{ arg }} \ | ||||
| {% endfor %} | {% endfor %} | ||||