Matrix Docker Ansible eploy
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 

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