| @@ -38,7 +38,7 @@ matrix_rustpush_bridge_appservice_public_address: '' | |||||
| # Displayname template for iMessage contacts. | # Displayname template for iMessage contacts. | ||||
| # Available variables: {{.FirstName}}, {{.LastName}}, {{.Nickname}}, | # Available variables: {{.FirstName}}, {{.LastName}}, {{.Nickname}}, | ||||
| # {{.Phone}}, {{.Email}}, {{.ID}} | # {{.Phone}}, {{.Email}}, {{.ID}} | ||||
| matrix_rustpush_bridge_network_displayname_template: "{% raw %}{{if .FirstName}}{{.FirstName}}{{if .LastName}} {{.LastName}}{{end}}{{else if .Nickname}}{{.Nickname}}{{else if .Phone}}{{.Phone}}{{else if .Email}}{{.Email}}{{else}}{{.ID}}{{end}}{% endraw %}" | |||||
| matrix_rustpush_bridge_network_displayname_template: "{% raw %}{{if .FirstName}}{{.FirstName}}{{if .LastName}} {{.LastName}}{{end}}{{else if .Nickname}}{{.Nickname}}{{else if .Phone}}{{.Phone}}{{else if .Email}}{{.Email}}{{else}}{{.ID}}{{end}} (iMessage){% endraw %}" | |||||
| matrix_rustpush_bridge_cloudkit_backfill: true | matrix_rustpush_bridge_cloudkit_backfill: true | ||||
| matrix_rustpush_bridge_video_transcoding: true | matrix_rustpush_bridge_video_transcoding: true | ||||
| @@ -64,11 +64,22 @@ | |||||
| - name: Ensure rustpush-bridge config.yaml installed | - name: Ensure rustpush-bridge config.yaml installed | ||||
| ansible.builtin.copy: | ansible.builtin.copy: | ||||
| content: "{{ matrix_rustpush_bridge_configuration | to_nice_yaml(indent=2, width=999999) }}" | |||||
| content: >- | |||||
| {{ | |||||
| matrix_rustpush_bridge_configuration | |||||
| | combine({ | |||||
| 'network': { | |||||
| 'displayname_template': matrix_rustpush_bridge_network_displayname_template_effective, | |||||
| }, | |||||
| }, recursive=True) | |||||
| | to_nice_yaml(indent=2, width=999999) | |||||
| }} | |||||
| dest: "{{ matrix_rustpush_bridge_config_path }}/config.yaml" | dest: "{{ matrix_rustpush_bridge_config_path }}/config.yaml" | ||||
| mode: 0644 | mode: 0644 | ||||
| owner: "{{ matrix_user_name }}" | owner: "{{ matrix_user_name }}" | ||||
| group: "{{ matrix_group_name }}" | group: "{{ matrix_group_name }}" | ||||
| vars: | |||||
| matrix_rustpush_bridge_network_displayname_template_effective: "{{ (matrix_rustpush_bridge_configuration.network | default({}, true)).displayname_template | default(matrix_rustpush_bridge_network_displayname_template) }}" | |||||
| register: matrix_rustpush_bridge_config_result | register: matrix_rustpush_bridge_config_result | ||||
| - name: Ensure rustpush-bridge registration.yaml installed | - name: Ensure rustpush-bridge registration.yaml installed | ||||
| @@ -24,8 +24,8 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \ | |||||
| --cap-drop=ALL \ | --cap-drop=ALL \ | ||||
| --network={{ matrix_rustpush_bridge_container_network }} \ | --network={{ matrix_rustpush_bridge_container_network }} \ | ||||
| --env HOME=/data \ | --env HOME=/data \ | ||||
| {% if matrix_rustpush_bridge_rust_log %}--env RUST_LOG={{ matrix_rustpush_bridge_rust_log }} \{% endif %} | |||||
| --mount type=bind,src={{ matrix_rustpush_bridge_config_path }},dst=/config \ | |||||
| {% if matrix_rustpush_bridge_rust_log %} --env RUST_LOG={{ matrix_rustpush_bridge_rust_log }} \ | |||||
| {% endif %} --mount type=bind,src={{ matrix_rustpush_bridge_config_path }},dst=/config \ | |||||
| --mount type=bind,src={{ matrix_rustpush_bridge_data_path }},dst=/data \ | --mount type=bind,src={{ matrix_rustpush_bridge_data_path }},dst=/data \ | ||||
| --label-file={{ matrix_rustpush_bridge_base_path }}/labels \ | --label-file={{ matrix_rustpush_bridge_base_path }}/labels \ | ||||
| --entrypoint /usr/local/bin/matrix-rustpush \ | --entrypoint /usr/local/bin/matrix-rustpush \ | ||||