Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

181 строка
7.9 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 mxisd 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. # The unique ID of this appservice.
  55. id: facebook
  56. # Username of the appservice bot.
  57. bot_username: facebookbot
  58. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  59. # to leave display name/avatar as-is.
  60. bot_displayname: Facebook bridge bot
  61. bot_avatar: mxc://maunium.net/ddtNPZSKMNqaUzqrHuWvUADv
  62. # Authentication tokens for AS <-> HS communication.
  63. as_token: "{{ matrix_mautrix_facebook_appservice_token }}"
  64. hs_token: "{{ matrix_mautrix_facebook_homeserver_token }}"
  65. # Bridge config
  66. bridge:
  67. # Localpart template of MXIDs for Facebook users.
  68. # {userid} is replaced with the user ID of the Facebook user.
  69. username_template: "facebook_{userid}"
  70. # Displayname template for Facebook users.
  71. # {displayname} is replaced with the display name of the Facebook user
  72. # as defined below in displayname_preference.
  73. # Keys available for displayname_preference are also available here.
  74. displayname_template: '{displayname} (FB)'
  75. # Available keys:
  76. # "name" (full name)
  77. # "first_name"
  78. # "last_name"
  79. # "nickname"
  80. # "own_nickname" (user-specific!)
  81. displayname_preference:
  82. - name
  83. # The prefix for commands. Only required in non-management rooms.
  84. command_prefix: "!fb"
  85. # Number of chats to sync (and create portals for) on startup/login.
  86. # Maximum 20, set 0 to disable automatic syncing.
  87. initial_chat_sync: 10
  88. # Whether or not the Facebook users of logged in Matrix users should be
  89. # invited to private chats when the user sends a message from another client.
  90. invite_own_puppet_to_pm: false
  91. # Whether or not to use /sync to get presence, read receipts and typing notifications when using
  92. # your own Matrix account as the Matrix puppet for your Facebook account.
  93. sync_with_custom_puppets: true
  94. # Whether or not to bridge presence in both directions. Facebook allows users not to broadcast
  95. # presence, but then it won't send other users' presence to the client.
  96. presence: true
  97. # Permissions for using the bridge.
  98. # Permitted values:
  99. # user - Use the bridge with puppeting.
  100. # admin - Use and administrate the bridge.
  101. # Permitted keys:
  102. # * - All Matrix users
  103. # domain - All users on that homeserver
  104. # mxid - Specific user
  105. permissions:
  106. '{{ matrix_mautrix_facebook_homeserver_domain }}': user
  107. # Python logging configuration.
  108. #
  109. # See section 16.7.2 of the Python documentation for more info:
  110. # https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema
  111. logging:
  112. version: 1
  113. formatters:
  114. colored:
  115. (): mautrix_facebook.util.ColorFormatter
  116. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  117. normal:
  118. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  119. handlers:
  120. console:
  121. class: logging.StreamHandler
  122. formatter: colored
  123. loggers:
  124. mau:
  125. level: DEBUG
  126. fbchat:
  127. level: DEBUG
  128. aiohttp:
  129. level: INFO
  130. root:
  131. level: DEBUG
  132. handlers: [console]
  133. matrix_mautrix_facebook_configuration_extension_yaml: |
  134. # Your custom YAML configuration goes here.
  135. # This configuration extends the default starting configuration (`matrix_mautrix_facebook_configuration_yaml`).
  136. #
  137. # You can override individual variables from the default configuration, or introduce new ones.
  138. #
  139. # If you need something more special, you can take full control by
  140. # completely redefining `matrix_mautrix_facebook_configuration_yaml`.
  141. 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 {} }}"
  142. # Holds the final configuration (a combination of the default and its extension).
  143. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_facebook_configuration_yaml`.
  144. matrix_mautrix_facebook_configuration: "{{ matrix_mautrix_facebook_configuration_yaml|from_yaml|combine(matrix_mautrix_facebook_configuration_extension, recursive=True) }}"
  145. matrix_mautrix_facebook_registration_yaml: |
  146. id: facebook
  147. as_token: "{{ matrix_mautrix_facebook_appservice_token }}"
  148. hs_token: "{{ matrix_mautrix_facebook_homeserver_token }}"
  149. namespaces:
  150. users:
  151. - exclusive: true
  152. regex: '^@facebook_.+:{{ matrix_mautrix_facebook_homeserver_domain|regex_escape }}$'
  153. url: {{ matrix_mautrix_facebook_appservice_address }}
  154. sender_localpart: facebookbot
  155. rate_limited: false
  156. matrix_mautrix_facebook_registration: "{{ matrix_mautrix_facebook_registration_yaml|from_yaml }}"