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

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