Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

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