Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

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