Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

204 lines
9.1 KiB

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