Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

218 wiersze
9.9 KiB

  1. # mautrix-hangouts is a Matrix <-> Hangouts bridge
  2. # See: https://github.com/tulir/mautrix-hangouts
  3. matrix_mautrix_hangouts_enabled: true
  4. matrix_mautrix_hangouts_container_image_self_build: false
  5. # See: https://mau.dev/tulir/mautrix-hangouts/container_registry
  6. matrix_mautrix_hangouts_docker_image: "dock.mau.dev/tulir/mautrix-hangouts:latest"
  7. matrix_mautrix_hangouts_docker_image_force_pull: "{{ matrix_mautrix_hangouts_docker_image.endswith(':latest') }}"
  8. matrix_mautrix_hangouts_base_path: "{{ matrix_base_data_path }}/mautrix-hangouts"
  9. matrix_mautrix_hangouts_config_path: "{{ matrix_mautrix_hangouts_base_path }}/config"
  10. matrix_mautrix_hangouts_data_path: "{{ matrix_mautrix_hangouts_base_path }}/data"
  11. matrix_mautrix_hangouts_docker_src_files_path: "{{ matrix_mautrix_hangouts_base_path }}/docker-src"
  12. matrix_mautrix_hangouts_public_endpoint: '/mautrix-hangouts'
  13. matrix_mautrix_hangouts_homeserver_address: 'http://matrix-synapse:8008'
  14. matrix_mautrix_hangouts_homeserver_domain: '{{ matrix_domain }}'
  15. matrix_mautrix_hangouts_appservice_address: 'http://matrix-mautrix-hangouts:8080'
  16. # A list of extra arguments to pass to the container
  17. matrix_mautrix_hangouts_container_extra_arguments: []
  18. # List of systemd services that matrix-mautrix-hangouts.service depends on.
  19. matrix_mautrix_hangouts_systemd_required_services_list: ['docker.service']
  20. # List of systemd services that matrix-mautrix-hangouts.service wants
  21. matrix_mautrix_hangouts_systemd_wanted_services_list: []
  22. matrix_mautrix_hangouts_appservice_token: ''
  23. matrix_mautrix_hangouts_homeserver_token: ''
  24. # Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth).
  25. matrix_mautrix_hangouts_login_shared_secret: ''
  26. # Default configuration template which covers the generic use case.
  27. # You can customize it by controlling the various variables inside it.
  28. #
  29. # For a more advanced customization, you can extend the default (see `matrix_mautrix_hangouts_configuration_extension_yaml`)
  30. # or completely replace this variable with your own template.
  31. matrix_mautrix_hangouts_configuration_yaml: |
  32. #jinja2: lstrip_blocks: "True"
  33. # Homeserver details
  34. homeserver:
  35. # The address that this appservice can use to connect to the homeserver.
  36. address: {{ matrix_mautrix_hangouts_homeserver_address }}
  37. # The domain of the homeserver (for MXIDs, etc).
  38. domain: {{ matrix_mautrix_hangouts_homeserver_domain }}
  39. # Whether or not to verify the SSL certificate of the homeserver.
  40. # Only applies if address starts with https://
  41. verify_ssl: true
  42. # Application service host/registration related details
  43. # Changing these values requires regeneration of the registration.
  44. appservice:
  45. # The address that the homeserver can use to connect to this appservice.
  46. address: {{ matrix_mautrix_hangouts_appservice_address }}
  47. # The hostname and port where this appservice should listen.
  48. hostname: 0.0.0.0
  49. port: 8080
  50. # The maximum body size of appservice API requests (from the homeserver) in mebibytes
  51. # Usually 1 is enough, but on high-traffic bridges you might need to increase this to avoid 413s
  52. max_body_size: 1
  53. # The full URI to the database. SQLite and Postgres are fully supported.
  54. # Other DBMSes supported by SQLAlchemy may or may not work.
  55. # Format examples:
  56. # SQLite: sqlite:///filename.db
  57. # Postgres: postgres://username:password@hostname/dbname
  58. database: sqlite:////data/mautrix-hangouts.db
  59. # The unique ID of this appservice.
  60. id: hangouts
  61. # Username of the appservice bot.
  62. bot_username: hangoutsbot
  63. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  64. # to leave display name/avatar as-is.
  65. bot_displayname: Hangouts bridge bot
  66. bot_avatar: mxc://maunium.net/FBXZnpfORkBEruORbikmleAy
  67. # Authentication tokens for AS <-> HS communication.
  68. as_token: "{{ matrix_mautrix_hangouts_appservice_token }}"
  69. hs_token: "{{ matrix_mautrix_hangouts_homeserver_token }}"
  70. # Bridge config
  71. bridge:
  72. # Localpart template of MXIDs for Hangouts users.
  73. # {userid} is replaced with the user ID of the Hangouts user.
  74. username_template: "hangouts_{userid}"
  75. # Displayname template for Hangouts users.
  76. # {displayname} is replaced with the display name of the Hangouts user
  77. # as defined below in displayname_preference.
  78. # Keys available for displayname_preference are also available here.
  79. displayname_template: '{full_name} (Hangouts)'
  80. # Available keys:
  81. # "name" (full name)
  82. # "first_name"
  83. # "last_name"
  84. # "nickname"
  85. # "own_nickname" (user-specific!)
  86. displayname_preference:
  87. - name
  88. # The prefix for commands. Only required in non-management rooms.
  89. command_prefix: "!HO"
  90. # Number of chats to sync (and create portals for) on startup/login.
  91. # Maximum 20, set 0 to disable automatic syncing.
  92. initial_chat_sync: 20
  93. # Whether or not the Hangouts users of logged in Matrix users should be
  94. # invited to private chats when the user sends a message from another client.
  95. invite_own_puppet_to_pm: false
  96. # Whether or not to use /sync to get presence, read receipts and typing notifications when using
  97. # your own Matrix account as the Matrix puppet for your Hangouts account.
  98. sync_with_custom_puppets: true
  99. # Shared secret for https://github.com/devture/matrix-synapse-shared-secret-auth
  100. #
  101. # If set, custom puppets will be enabled automatically for local users
  102. # instead of users having to find an access token and run `login-matrix`
  103. # manually.
  104. login_shared_secret: {{ matrix_mautrix_hangouts_login_shared_secret|to_json }}
  105. # Whether or not to update avatars when syncing all contacts at startup.
  106. update_avatar_initial_sync: true
  107. # End-to-bridge encryption support options. These require matrix-nio to be installed with pip
  108. # and login_shared_secret to be configured in order to get a device for the bridge bot.
  109. #
  110. # Additionally, https://github.com/matrix-org/synapse/pull/5758 is required if using a normal
  111. # application service.
  112. encryption:
  113. # Allow encryption, work in group chat rooms with e2ee enabled
  114. allow: false
  115. # Default to encryption, force-enable encryption in all portals the bridge creates
  116. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  117. default: false
  118. # Public website and API configs
  119. web:
  120. # Auth server config
  121. auth:
  122. # Publicly accessible base URL for the login endpoints.
  123. # The prefix below is not implicitly added. This URL and all subpaths should be proxied
  124. # or otherwise pointed to the appservice's webserver to the path specified below (prefix).
  125. # This path should usually include a trailing slash.
  126. # Internal prefix in the appservice web server for the login endpoints.
  127. public: "{{ matrix_homeserver_url }}{{ matrix_mautrix_hangouts_public_endpoint }}/login"
  128. prefix: "{{ matrix_mautrix_hangouts_public_endpoint }}/login"
  129. # Permissions for using the bridge.
  130. # Permitted values:
  131. # user - Use the bridge with puppeting.
  132. # admin - Use and administrate the bridge.
  133. # Permitted keys:
  134. # * - All Matrix users
  135. # domain - All users on that homeserver
  136. # mxid - Specific user
  137. permissions:
  138. '{{ matrix_mautrix_hangouts_homeserver_domain }}': user
  139. # Python logging configuration.
  140. #
  141. # See section 16.7.2 of the Python documentation for more info:
  142. # https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema
  143. logging:
  144. version: 1
  145. formatters:
  146. colored:
  147. (): mautrix_hangouts.util.ColorFormatter
  148. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  149. normal:
  150. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  151. handlers:
  152. console:
  153. class: logging.StreamHandler
  154. formatter: colored
  155. loggers:
  156. mau:
  157. level: DEBUG
  158. hangups:
  159. level: DEBUG
  160. aiohttp:
  161. level: INFO
  162. root:
  163. level: DEBUG
  164. handlers: [console]
  165. matrix_mautrix_hangouts_configuration_extension_yaml: |
  166. # Your custom YAML configuration goes here.
  167. # This configuration extends the default starting configuration (`matrix_mautrix_hangouts_configuration_yaml`).
  168. #
  169. # You can override individual variables from the default configuration, or introduce new ones.
  170. #
  171. # If you need something more special, you can take full control by
  172. # completely redefining `matrix_mautrix_hangouts_configuration_yaml`.
  173. matrix_mautrix_hangouts_configuration_extension: "{{ matrix_mautrix_hangouts_configuration_extension_yaml|from_yaml if matrix_mautrix_hangouts_configuration_extension_yaml|from_yaml is mapping else {} }}"
  174. # Holds the final configuration (a combination of the default and its extension).
  175. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_hangouts_configuration_yaml`.
  176. matrix_mautrix_hangouts_configuration: "{{ matrix_mautrix_hangouts_configuration_yaml|from_yaml|combine(matrix_mautrix_hangouts_configuration_extension, recursive=True) }}"
  177. matrix_mautrix_hangouts_registration_yaml: |
  178. id: hangouts
  179. as_token: "{{ matrix_mautrix_hangouts_appservice_token }}"
  180. hs_token: "{{ matrix_mautrix_hangouts_homeserver_token }}"
  181. namespaces:
  182. users:
  183. - exclusive: true
  184. regex: '^@hangouts_.+:{{ matrix_mautrix_hangouts_homeserver_domain|regex_escape }}$'
  185. url: {{ matrix_mautrix_hangouts_appservice_address }}
  186. sender_localpart: hangoutsbot
  187. rate_limited: false
  188. matrix_mautrix_hangouts_registration: "{{ matrix_mautrix_hangouts_registration_yaml|from_yaml }}"