mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-12-12 08:43:55 +02:00
1ffa4a326c
added docs, added seperate service for database, pr comments
155 lines
7.2 KiB
YAML
155 lines
7.2 KiB
YAML
# matrix-sms-bridge is a Matrix <-> SMS bridge
|
|
# See: https://github.com/benkuly/matrix-sms-bridge
|
|
|
|
matrix_sms_bridge_enabled: true
|
|
|
|
matrix_sms_bridge_docker_image: "folivonet/matrix-sms-bridge:latest"
|
|
matrix_sms_bridge_docker_image_force_pull: "{{ matrix_sms_bridge_docker_image.endswith(':latest') }}"
|
|
matrix_sms_bridge_database_docker_image: "neo4j:latest"
|
|
matrix_sms_bridge_database_docker_image_force_pull: "{{ matrix_sms_bridge_docker_image.endswith(':latest') }}"
|
|
|
|
matrix_sms_bridge_base_path: "{{ matrix_base_data_path }}/matrix-sms-bridge"
|
|
matrix_sms_bridge_config_path: "{{ matrix_base_data_path }}/matrix-sms-bridge/config"
|
|
matrix_sms_bridge_data_path: "{{ matrix_base_data_path }}/matrix-sms-bridge/data"
|
|
matrix_sms_bridge_data_log_path: "{{ matrix_base_data_path }}/matrix-sms-bridge/data/log"
|
|
matrix_sms_bridge_data_spool_path: "{{ matrix_base_data_path }}/matrix-sms-bridge/data/spool"
|
|
matrix_sms_bridge_data_spool_inbox_path: "{{ matrix_base_data_path }}/matrix-sms-bridge/data/spool/inbox"
|
|
matrix_sms_bridge_data_spool_inbox_processed_path: "{{ matrix_base_data_path }}/matrix-sms-bridge/data/spool/inbox_processed"
|
|
matrix_sms_bridge_data_spool_outbox_path: "{{ matrix_base_data_path }}/matrix-sms-bridge/data/spool/outbox"
|
|
matrix_sms_bridge_data_spool_sent_path: "{{ matrix_base_data_path }}/matrix-sms-bridge/data/spool/sent"
|
|
matrix_sms_bridge_data_spool_error_path: "{{ matrix_base_data_path }}/matrix-sms-bridge/data/spool/error"
|
|
matrix_sms_bridge_database_path: "{{ matrix_base_data_path }}/matrix-sms-bridge/database"
|
|
|
|
matrix_sms_bridge_appservice_token: ''
|
|
matrix_sms_bridge_homeserver_token: ''
|
|
|
|
matrix_sms_bridge_database_username: 'matrix-sms-bridge'
|
|
matrix_sms_bridge_database_password: ''
|
|
|
|
matrix_sms_bridge_container_http_host_bind_port: ''
|
|
|
|
# A list of extra arguments to pass to the container
|
|
matrix_sms_bridge_container_extra_arguments: []
|
|
|
|
# List of systemd services that service depends on.
|
|
matrix_sms_bridge_systemd_required_services_list: ['docker.service','matrix-sms-bridge-database.service']
|
|
matrix_sms_bridge_database_systemd_required_services_list: ['docker.service']
|
|
|
|
# List of systemd services that service wants
|
|
matrix_sms_bridge_systemd_wanted_services_list: []
|
|
matrix_sms_bridge_database_systemd_wanted_services_list: []
|
|
|
|
matrix_sms_bridge_appservice_url: 'http://matrix-sms-bridge:8080'
|
|
matrix_sms_bridge_database_url: 'bolt://matrix-sms-bridge-database:7687'
|
|
matrix_sms_bridge_homeserver_hostname: 'matrix-synapse'
|
|
matrix_sms_bridge_homeserver_port: '8008'
|
|
|
|
matrix_sms_bridge_homserver_domain: "{{ matrix_domain }}"
|
|
matrix_sms_bridge_default_room: ''
|
|
|
|
matrix_sms_bridge_gammu_modem: ''
|
|
|
|
|
|
matrix_sms_bridge_configuration_yaml: |
|
|
#jinja2: lstrip_blocks: "True"
|
|
|
|
# Database connection
|
|
org:
|
|
neo4j:
|
|
driver:
|
|
uri: {{ matrix_sms_bridge_database_url }}
|
|
authentication:
|
|
username: {{ matrix_sms_bridge_database_username }}
|
|
password: {{ matrix_sms_bridge_database_password }}
|
|
|
|
matrix:
|
|
bridge:
|
|
sms:
|
|
# (optional) SMS messages without a valid token a routed to this room.
|
|
# Note that you must invite @smsbot:yourHomeServer to this room.
|
|
defaultRoomId: "{{ matrix_sms_bridge_default_room }}"
|
|
templates:
|
|
# (optional) The message, that will be sent as SMS. Valid placeholders are {sender}, {body} and {token}.
|
|
outgoingMessage: "{sender} wrote:\n\n{body}\n\nTo answer to this message add this token to your message: {token}"
|
|
# (optional) The message, that will be sent as SMS, when an incoming SMS didn't contain a valid token
|
|
# and was routed to a default room. By default no answer will be sent.
|
|
answerInvalidTokenWithDefaultRoom: "Your token was invalid. The message will be sent to a default matrix room."
|
|
# (optional) The message, that will be sent as SMS, when an incoming SMS didn't contain a valid token
|
|
# and no default room is configured.
|
|
answerInvalidTokenWithoutDefaultRoom: "Your message did not contain any valid token. Nobody will read your message.",
|
|
# (optional) The message, that will be sent to a matrix room, when sending a bridged message via SMS failed.
|
|
sendSmsError: "Could not send SMS to this user. Please try it again later."
|
|
# (optional) The content of bridged SMS message into the default room. Valid placeholders are {sender} and {body}.
|
|
defaultRoomIncomingMessage: "{sender} wrote:\n{body}"
|
|
provider:
|
|
gammu:
|
|
# (optional) default is disabled
|
|
enabled: true
|
|
# (optional) Path to the Gammu-Inbox directory.
|
|
inboxPath: "{{ matrix_sms_bridge_data_spool_inbox_path }}"
|
|
# (optional) Path to the directory, where to put processed messages.
|
|
inboxProcessedPath: "{{ matrix_sms_bridge_data_spool_inbox_path_processed }}"
|
|
bot:
|
|
# The domain-part of matrix-ids. E. g. example.org when your userIds look like @unicorn:example.org
|
|
serverName: {{ matrix_sms_bridge_homserver_domain }}
|
|
client:
|
|
homeServer:
|
|
# The hostname of your Homeserver.
|
|
hostname: {{ matrix_sms_bridge_homeserver_hostname }}
|
|
# (optional) The port of your Homeserver. Default is 443.
|
|
port: {{ matrix_sms_bridge_homeserver_port }}
|
|
# (optional) Use http or https. Default is true (so uses https).
|
|
secure: false
|
|
# The token to authenticate against the Homeserver.
|
|
token: {{ matrix_sms_bridge_appservice_token }}
|
|
appservice:
|
|
# A unique token for Homeservers to use to authenticate requests to this application service.
|
|
hsToken: {{ matrix_sms_bridge_homeserver_token }}
|
|
|
|
matrix_sms_bridge_configuration_extension_yaml: |
|
|
# Your custom YAML configuration goes here.
|
|
# This configuration extends the default starting configuration (`matrix_sms_bridge_configuration_yaml`).
|
|
#
|
|
# You can override individual variables from the default configuration, or introduce new ones.
|
|
#
|
|
# If you need something more special, you can take full control by
|
|
# completely redefining `matrix_sms_bridge_configuration_yaml`.
|
|
|
|
matrix_sms_bridge_configuration_extension: "{{ matrix_sms_bridge_configuration_extension_yaml|from_yaml if matrix_sms_bridge_configuration_extension_yaml|from_yaml is mapping else {} }}"
|
|
|
|
matrix_sms_bridge_gammu_configuration: |
|
|
[gammu]
|
|
Device = /dev/ttyModem
|
|
LogFile = {{ matrix_sms_bridge_data_log_path }}/gammu.log
|
|
debugLevel = 1
|
|
|
|
[smsd]
|
|
Service = files
|
|
LoopSleep = 2
|
|
InboxPath = {{ matrix_sms_bridge_data_spool_inbox_path }}
|
|
OutboxPath = {{ matrix_sms_bridge_data_spool_outbox_path }}
|
|
SentSMSPath = {{ matrix_sms_bridge_data_spool_sent_path }}
|
|
ErrorSMSPath = {{ matrix_sms_bridge_data_spool_error_path }}
|
|
InboxFormat = detail
|
|
OutboxFormat = detail
|
|
TransmitFormat = auto
|
|
debugLevel = 1
|
|
LogFile = {{ matrix_sms_bridge_data_log_path }}/smsd.log
|
|
DeliveryReport = log
|
|
DeliveryReportDelay = 7200
|
|
HangupCalls = 1
|
|
CheckBattery = 0
|
|
|
|
|
|
matrix_sms_bridge_registration_yaml: |
|
|
id: sms
|
|
as_token: "{{ matrix_sms_bridge_appservice_token }}"
|
|
hs_token: "{{ matrix_sms_bridge_homeserver_token }}"
|
|
namespaces:
|
|
users:
|
|
- exclusive: true
|
|
regex: '^@sms_.+:{{ matrix_sms_bridge_homserver_domain|regex_escape }}$'
|
|
url: {{ matrix_sms_bridge_appservice_url }}
|
|
sender_localpart: smsbot
|
|
rate_limited: false
|