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.
 
 

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