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.
 
 

152 lines
8.0 KiB

  1. ---
  2. # mautrix-facebook is a Matrix <-> Facebook bridge
  3. # Project source code URL: https://github.com/mautrix/facebook
  4. matrix_mautrix_facebook_enabled: true
  5. matrix_mautrix_facebook_container_image_self_build: false
  6. matrix_mautrix_facebook_container_image_self_build_repo: "https://mau.dev/mautrix/facebook.git"
  7. matrix_mautrix_facebook_version: v0.4.1
  8. matrix_mautrix_facebook_docker_image: "{{ matrix_mautrix_facebook_docker_image_name_prefix }}mautrix/facebook:{{ matrix_mautrix_facebook_version }}"
  9. matrix_mautrix_facebook_docker_image_name_prefix: "{{ 'localhost/' if matrix_mautrix_facebook_container_image_self_build else 'dock.mau.dev/' }}"
  10. matrix_mautrix_facebook_docker_image_force_pull: "{{ matrix_mautrix_facebook_docker_image.endswith(':latest') }}"
  11. matrix_mautrix_facebook_base_path: "{{ matrix_base_data_path }}/mautrix-facebook"
  12. matrix_mautrix_facebook_config_path: "{{ matrix_mautrix_facebook_base_path }}/config"
  13. matrix_mautrix_facebook_data_path: "{{ matrix_mautrix_facebook_base_path }}/data"
  14. matrix_mautrix_facebook_docker_src_files_path: "{{ matrix_mautrix_facebook_base_path }}/docker-src"
  15. matrix_mautrix_facebook_command_prefix: "!fb"
  16. # Whether or not the public-facing endpoints should be enabled (web-based login)
  17. matrix_mautrix_facebook_appservice_public_enabled: true
  18. # Mautrix Facebook public endpoint to log in to Facebook
  19. matrix_mautrix_facebook_public_endpoint: ''
  20. matrix_mautrix_facebook_homeserver_address: "{{ matrix_homeserver_container_url }}"
  21. matrix_mautrix_facebook_homeserver_domain: '{{ matrix_domain }}'
  22. matrix_mautrix_facebook_appservice_address: 'http://matrix-mautrix-facebook:29319'
  23. matrix_mautrix_facebook_appservice_public_external: 'https://{{ matrix_server_fqn_matrix }}{{ matrix_mautrix_facebook_public_endpoint }}'
  24. # A list of extra arguments to pass to the container
  25. matrix_mautrix_facebook_container_extra_arguments: []
  26. # List of systemd services that matrix-mautrix-facebook.service depends on.
  27. matrix_mautrix_facebook_systemd_required_services_list: ['docker.service']
  28. # List of systemd services that matrix-mautrix-facebook.service wants
  29. matrix_mautrix_facebook_systemd_wanted_services_list: []
  30. matrix_mautrix_facebook_appservice_token: ''
  31. matrix_mautrix_facebook_homeserver_token: ''
  32. # Whether or not created rooms should have federation enabled.
  33. # If false, created portal rooms will never be federated.
  34. matrix_mautrix_facebook_federate_rooms: true
  35. # Whether or not metrics endpoint should be enabled.
  36. # Enabling them is usually enough for a local (in-container) Prometheus to consume them.
  37. # If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_mautrix_facebook_metrics_proxying_enabled`.
  38. matrix_mautrix_facebook_metrics_enabled: false
  39. # Controls whether metrics should be proxied (exposed) on `matrix.DOMAIN/metrics/mautrix-facebook`.
  40. # This will only work take effect if `matrix_nginx_proxy_proxy_matrix_metrics_enabled: true`.
  41. # See the `matrix-nginx-proxy` role for details about enabling `matrix_nginx_proxy_proxy_matrix_metrics_enabled`.
  42. matrix_mautrix_facebook_metrics_proxying_enabled: false
  43. matrix_mautrix_facebook_bridge_permissions: |
  44. {{
  45. {matrix_mautrix_facebook_homeserver_domain: 'user'}
  46. | combine({matrix_admin: 'admin'} if matrix_admin else {})
  47. }}
  48. # Controls whether the matrix-mautrix-facebook container exposes its HTTP port.
  49. #
  50. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9008"), or empty string to not expose.
  51. matrix_mautrix_facebook_container_http_host_bind_port: ''
  52. # Database-related configuration fields.
  53. #
  54. # To use SQLite:
  55. # - change the engine (`matrix_mautrix_facebook_database_engine: 'sqlite'`)
  56. # - change to the last bridge version that supported SQLite:
  57. # `matrix_mautrix_facebook_docker_image: "{{ matrix_mautrix_facebook_docker_image_name_prefix }}tulir/mautrix-facebook:da1b4ec596e334325a1589e70829dea46e73064b"`
  58. # - plan your migration to Postgres, as this bridge does not support SQLite anymore (and neither will the playbook in the future).
  59. #
  60. # To use Postgres:
  61. # - adjust your database credentials via the `matrix_mautrix_facebook_database_*` variables
  62. matrix_mautrix_facebook_database_engine: 'postgres'
  63. matrix_mautrix_facebook_sqlite_database_path_local: "{{ matrix_mautrix_facebook_data_path }}/mautrix-facebook.db"
  64. matrix_mautrix_facebook_sqlite_database_path_in_container: "/data/mautrix-facebook.db"
  65. matrix_mautrix_facebook_database_username: 'matrix_mautrix_facebook'
  66. matrix_mautrix_facebook_database_password: 'some-password'
  67. matrix_mautrix_facebook_database_hostname: ''
  68. matrix_mautrix_facebook_database_port: 5432
  69. matrix_mautrix_facebook_database_name: 'matrix_mautrix_facebook'
  70. matrix_mautrix_facebook_database_connection_string: 'postgres://{{ matrix_mautrix_facebook_database_username }}:{{ matrix_mautrix_facebook_database_password }}@{{ matrix_mautrix_facebook_database_hostname }}:{{ matrix_mautrix_facebook_database_port }}/{{ matrix_mautrix_facebook_database_name }}'
  71. matrix_mautrix_facebook_appservice_database: "{{
  72. {
  73. 'sqlite': ('sqlite:///' + matrix_mautrix_facebook_sqlite_database_path_in_container),
  74. 'postgres': matrix_mautrix_facebook_database_connection_string,
  75. }[matrix_mautrix_facebook_database_engine]
  76. }}"
  77. # Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth).
  78. matrix_mautrix_facebook_login_shared_secret: ''
  79. matrix_mautrix_facebook_bridge_login_shared_secret_map: "{{ {matrix_mautrix_facebook_homeserver_domain: matrix_mautrix_facebook_login_shared_secret} if matrix_mautrix_facebook_login_shared_secret else {} }}"
  80. matrix_mautrix_facebook_appservice_bot_username: facebookbot
  81. matrix_mautrix_facebook_bridge_presence: true
  82. # Specifies the default log level for all bridge loggers.
  83. matrix_mautrix_facebook_logging_level: WARNING
  84. # Default configuration template which covers the generic use case.
  85. # You can customize it by controlling the various variables inside it.
  86. #
  87. # For a more advanced customization, you can extend the default (see `matrix_mautrix_facebook_configuration_extension_yaml`)
  88. # or completely replace this variable with your own template.
  89. matrix_mautrix_facebook_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  90. matrix_mautrix_facebook_configuration_extension_yaml: |
  91. # Your custom YAML configuration goes here.
  92. # This configuration extends the default starting configuration (`matrix_mautrix_facebook_configuration_yaml`).
  93. #
  94. # You can override individual variables from the default configuration, or introduce new ones.
  95. #
  96. # If you need something more special, you can take full control by
  97. # completely redefining `matrix_mautrix_facebook_configuration_yaml`.
  98. 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 {} }}"
  99. # Holds the final configuration (a combination of the default and its extension).
  100. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_facebook_configuration_yaml`.
  101. matrix_mautrix_facebook_configuration: "{{ matrix_mautrix_facebook_configuration_yaml | from_yaml | combine(matrix_mautrix_facebook_configuration_extension, recursive=True) }}"
  102. matrix_mautrix_facebook_registration_yaml: |
  103. id: facebook
  104. as_token: "{{ matrix_mautrix_facebook_appservice_token }}"
  105. hs_token: "{{ matrix_mautrix_facebook_homeserver_token }}"
  106. namespaces:
  107. users:
  108. - exclusive: true
  109. regex: '^@facebook_.+:{{ matrix_mautrix_facebook_homeserver_domain | regex_escape }}$'
  110. - exclusive: true
  111. regex: '^@{{ matrix_mautrix_facebook_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_facebook_homeserver_domain | regex_escape }}$'
  112. url: {{ matrix_mautrix_facebook_appservice_address }}
  113. # See https://github.com/mautrix/signal/issues/43
  114. sender_localpart: _bot_{{ matrix_mautrix_facebook_appservice_bot_username }}
  115. rate_limited: false
  116. de.sorunome.msc2409.push_ephemeral: true
  117. matrix_mautrix_facebook_registration: "{{ matrix_mautrix_facebook_registration_yaml | from_yaml }}"