Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

207 lignes
9.1 KiB

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