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.
 
 

207 lines
9.3 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. # Public website and API configs
  108. web:
  109. # Auth server config
  110. auth:
  111. # Publicly accessible base URL for the login endpoints.
  112. # The prefix below is not implicitly added. This URL and all subpaths should be proxied
  113. # or otherwise pointed to the appservice's webserver to the path specified below (prefix).
  114. # This path should usually include a trailing slash.
  115. # Internal prefix in the appservice web server for the login endpoints.
  116. public: "{{ matrix_homeserver_url }}{{ matrix_mautrix_hangouts_public_endpoint }}/login"
  117. prefix: "{{ matrix_mautrix_hangouts_public_endpoint }}/login"
  118. # Permissions for using the bridge.
  119. # Permitted values:
  120. # user - Use the bridge with puppeting.
  121. # admin - Use and administrate the bridge.
  122. # Permitted keys:
  123. # * - All Matrix users
  124. # domain - All users on that homeserver
  125. # mxid - Specific user
  126. permissions:
  127. '{{ matrix_mautrix_hangouts_homeserver_domain }}': user
  128. # Python logging configuration.
  129. #
  130. # See section 16.7.2 of the Python documentation for more info:
  131. # https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema
  132. logging:
  133. version: 1
  134. formatters:
  135. colored:
  136. (): mautrix_hangouts.util.ColorFormatter
  137. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  138. normal:
  139. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  140. handlers:
  141. console:
  142. class: logging.StreamHandler
  143. formatter: colored
  144. loggers:
  145. mau:
  146. level: DEBUG
  147. hangups:
  148. level: DEBUG
  149. aiohttp:
  150. level: INFO
  151. root:
  152. level: DEBUG
  153. handlers: [console]
  154. matrix_mautrix_hangouts_configuration_extension_yaml: |
  155. # Your custom YAML configuration goes here.
  156. # This configuration extends the default starting configuration (`matrix_mautrix_hangouts_configuration_yaml`).
  157. #
  158. # You can override individual variables from the default configuration, or introduce new ones.
  159. #
  160. # If you need something more special, you can take full control by
  161. # completely redefining `matrix_mautrix_hangouts_configuration_yaml`.
  162. 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 {} }}"
  163. # Holds the final configuration (a combination of the default and its extension).
  164. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_hangouts_configuration_yaml`.
  165. matrix_mautrix_hangouts_configuration: "{{ matrix_mautrix_hangouts_configuration_yaml|from_yaml|combine(matrix_mautrix_hangouts_configuration_extension, recursive=True) }}"
  166. matrix_mautrix_hangouts_registration_yaml: |
  167. id: hangouts
  168. as_token: "{{ matrix_mautrix_hangouts_appservice_token }}"
  169. hs_token: "{{ matrix_mautrix_hangouts_homeserver_token }}"
  170. namespaces:
  171. users:
  172. - exclusive: true
  173. regex: '^@hangouts_.+:{{ matrix_mautrix_hangouts_homeserver_domain|regex_escape }}$'
  174. url: {{ matrix_mautrix_hangouts_appservice_address }}
  175. sender_localpart: hangoutsbot
  176. rate_limited: false
  177. matrix_mautrix_hangouts_registration: "{{ matrix_mautrix_hangouts_registration_yaml|from_yaml }}"