Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

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