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.
 
 

183 lignes
7.8 KiB

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