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.
 
 

192 Zeilen
9.2 KiB

  1. # mautrix-whatsapp is a Matrix <-> Whatsapp bridge
  2. # See: https://github.com/tulir/mautrix-whatsapp
  3. matrix_mautrix_whatsapp_enabled: true
  4. matrix_mautrix_whatsapp_docker_image: "tulir/mautrix-whatsapp:latest"
  5. matrix_mautrix_whatsapp_docker_image_force_pull: "{{ matrix_mautrix_whatsapp_docker_image.endswith(':latest') }}"
  6. matrix_mautrix_whatsapp_base_path: "{{ matrix_base_data_path }}/mautrix-whatsapp"
  7. matrix_mautrix_whatsapp_config_path: "{{ matrix_mautrix_whatsapp_base_path }}/config"
  8. matrix_mautrix_whatsapp_data_path: "{{ matrix_mautrix_whatsapp_base_path }}/data"
  9. matrix_mautrix_whatsapp_homeserver_address: "http://matrix-synapse:8008"
  10. matrix_mautrix_whatsapp_homeserver_domain: "{{ matrix_domain }}"
  11. matrix_mautrix_whatsapp_appservice_address: "http://matrix-mautrix-whatsapp:8080"
  12. # A list of extra arguments to pass to the container
  13. matrix_mautrix_whatsapp_container_extra_arguments: []
  14. # List of systemd services that matrix-mautrix-whatsapp.service depends on.
  15. matrix_mautrix_whatsapp_systemd_required_services_list: ['docker.service']
  16. # List of systemd services that matrix-mautrix-whatsapp.service wants
  17. matrix_mautrix_whatsapp_systemd_wanted_services_list: []
  18. matrix_mautrix_whatsapp_appservice_token: ''
  19. matrix_mautrix_whatsapp_homeserver_token: ''
  20. # Default mautrix-whatsapp 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_whatsapp_configuration_extension_yaml`)
  24. # or completely replace this variable with your own template.
  25. matrix_mautrix_whatsapp_configuration_yaml: |
  26. # Homeserver details.
  27. homeserver:
  28. # The address that this appservice can use to connect to the homeserver.
  29. address: {{ matrix_mautrix_whatsapp_homeserver_address }}
  30. # The domain of the homeserver (for MXIDs, etc).
  31. domain: {{ matrix_mautrix_whatsapp_homeserver_domain }}
  32. # Application service host/registration related details.
  33. # Changing these values requires regeneration of the registration.
  34. appservice:
  35. # The address that the homeserver can use to connect to this appservice.
  36. address: {{ matrix_mautrix_whatsapp_appservice_address }}
  37. # The hostname and port where this appservice should listen.
  38. hostname: 0.0.0.0
  39. port: 8080
  40. # Database config.
  41. database:
  42. # The database type. "sqlite3" and "postgres" are supported.
  43. type: sqlite3
  44. # The database URI.
  45. # SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string
  46. # Postgres: Connection string. For example, postgres://user:password@host/database
  47. uri: mautrix-whatsapp.db
  48. # Maximum number of connections. Mostly relevant for Postgres.
  49. max_open_conns: 20
  50. max_idle_conns: 2
  51. # Path to the Matrix room state store.
  52. state_store_path: ./mx-state.json
  53. # The unique ID of this appservice.
  54. id: whatsapp
  55. # Appservice bot details.
  56. bot:
  57. # Username of the appservice bot.
  58. username: whatsappbot
  59. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  60. # to leave display name/avatar as-is.
  61. displayname: WhatsApp bridge bot
  62. avatar: mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr
  63. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  64. as_token: "{{ matrix_mautrix_whatsapp_appservice_token }}"
  65. hs_token: "{{ matrix_mautrix_whatsapp_homeserver_token }}"
  66. # Bridge config
  67. bridge:
  68. # Localpart template of MXIDs for WhatsApp users.
  69. # {{ '{{.}}' }} is replaced with the phone number of the WhatsApp user.
  70. username_template: "{{ 'whatsapp_{{.}}' }}"
  71. # Displayname template for WhatsApp users.
  72. # {{ '{{.Notify'}}' }} - nickname set by the WhatsApp user
  73. # {{ '{{.Jid}}' }} - phone number (international format)
  74. # The following variables are also available, but will cause problems on multi-user instances:
  75. # {{ '{{.Name}}' }} - display name from contact list
  76. # {{ '{{.Short}}' }} - short display name from contact list
  77. displayname_template: "{{ '{{if .Notify}}{{.Notify}}{{else}}{{.Jid}}{{end}} (WA)' }}"
  78. # WhatsApp connection timeout in seconds.
  79. connection_timeout: 20
  80. # Maximum number of times to retry connecting on connection error.
  81. max_connection_attempts: 3
  82. # Number of seconds to wait between connection attempts.
  83. # Negative numbers are exponential backoff: -connection_retry_delay + 1 + 2^attempts
  84. connection_retry_delay: -1
  85. # Whether or not the bridge should send a notice to the user's management room when it retries connecting.
  86. # If false, it will only report when it stops retrying.
  87. report_connection_retry: true
  88. # Number of seconds to wait for contacts and chats to be sent at startup before syncing.
  89. # If you have lots of chats, it might take more than a second.
  90. contact_wait_delay: 1
  91. # Number of chats to sync for new users.
  92. initial_chat_sync_count: 10
  93. # Number of old messages to fill when creating new portal rooms.
  94. initial_history_fill_count: 20
  95. # Maximum number of chats to sync when recovering from downtime.
  96. # Set to -1 to sync all new chats during downtime.
  97. recovery_chat_sync_limit: -1
  98. # Whether or not to sync history when recovering from downtime.
  99. recovery_history_backfill: true
  100. # Maximum number of seconds since last message in chat to skip
  101. # syncing the chat in any case. This setting will take priority
  102. # over both recovery_chat_sync_limit and initial_chat_sync_count.
  103. # Default is 3 days = 259200 seconds
  104. sync_max_chat_age: 259200
  105. # Whether or not to sync with custom puppets to receive EDUs that
  106. # are not normally sent to appservices.
  107. sync_with_custom_puppets: true
  108. # Whether or not to invite own WhatsApp user's Matrix puppet into private
  109. # chat portals when backfilling if needed.
  110. # This always uses the default puppet instead of custom puppets due to
  111. # rate limits and timestamp massaging.
  112. invite_own_puppet_for_backfilling: true
  113. # Whether or not to explicitly set the avatar and room name for private
  114. # chat portal rooms. This can be useful if the previous field works fine,
  115. # but causes room avatar/name bugs.
  116. private_chat_portal_meta: false
  117. # The prefix for commands. Only required in non-management rooms.
  118. command_prefix: "!wa"
  119. # Permissions for using the bridge.
  120. # Permitted values:
  121. # user - Access to use the bridge to chat with a WhatsApp account.
  122. # admin - User level and some additional administration tools
  123. # Permitted keys:
  124. # * - All Matrix users
  125. # domain - All users on that homeserver
  126. # mxid - Specific user
  127. permissions:
  128. "{{ matrix_mautrix_whatsapp_homeserver_domain }}": user
  129. # Logging config.
  130. logging:
  131. # The directory for log files. Will be created if not found.
  132. directory: ./logs
  133. # Available variables: .Date for the file date and .Index for different log files on the same day.
  134. file_name_format: "{{ '{{.Date}}-{{.Index}}.log' }}"
  135. # Date format for file names in the Go time format: https://golang.org/pkg/time/#pkg-constants
  136. file_date_format: "2006-01-02"
  137. # Log file permissions.
  138. file_mode: 0600
  139. # Timestamp format for log entries in the Go time format.
  140. timestamp_format: "Jan _2, 2006 15:04:05"
  141. # Minimum severity for log messages.
  142. # Options: debug, info, warn, error, fatal
  143. print_level: debug
  144. matrix_mautrix_whatsapp_configuration_extension_yaml: |
  145. # Your custom YAML configuration goes here.
  146. # This configuration extends the default starting configuration (`matrix_mautrix_whatsapp_configuration_yaml`).
  147. #
  148. # You can override individual variables from the default configuration, or introduce new ones.
  149. #
  150. # If you need something more special, you can take full control by
  151. # completely redefining `matrix_mautrix_whatsapp_configuration_yaml`.
  152. matrix_mautrix_whatsapp_configuration_extension: "{{ matrix_mautrix_whatsapp_configuration_extension_yaml|from_yaml if matrix_mautrix_whatsapp_configuration_extension_yaml|from_yaml is mapping else {} }}"
  153. # Holds the final configuration (a combination of the default and its extension).
  154. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_whatsapp_configuration_yaml`.
  155. matrix_mautrix_whatsapp_configuration: "{{ matrix_mautrix_whatsapp_configuration_yaml|from_yaml|combine(matrix_mautrix_whatsapp_configuration_extension, recursive=True) }}"
  156. matrix_mautrix_whatsapp_registration_yaml: |
  157. id: whatsapp
  158. url: {{ matrix_mautrix_whatsapp_appservice_address }}
  159. as_token: "{{ matrix_mautrix_whatsapp_appservice_token }}"
  160. hs_token: "{{ matrix_mautrix_whatsapp_homeserver_token }}"
  161. sender_localpart: whatsappbot
  162. rate_limited: false
  163. namespaces:
  164. users:
  165. - regex: '^@whatsapp_[0-9]+:{{ matrix_mautrix_whatsapp_homeserver_domain|regex_escape }}$'
  166. exclusive: true
  167. matrix_mautrix_whatsapp_registration: "{{ matrix_mautrix_whatsapp_registration_yaml|from_yaml }}"