Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

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