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.
 
 

304 lines
13 KiB

  1. {#
  2. SPDX-FileCopyrightText: 2023 - 2024 MDAD project contributors
  3. SPDX-FileCopyrightText: 2024 Slavi Pantaleev
  4. SPDX-FileCopyrightText: 2024 Suguru Hirahara
  5. SPDX-License-Identifier: AGPL-3.0-or-later
  6. #}
  7. # Endpoint URL that Draupnir uses to interact with the Matrix homeserver (client-server API),
  8. homeserverUrl: {{ matrix_bot_draupnir_homeserver_url | to_json }}
  9. # Endpoint URL that Draupnir could use to fetch events related to reports (client-server API and /_synapse/),
  10. # only set this to the public-internet homeserver client API URL, do NOT set this to the pantalaimon URL.
  11. rawHomeserverUrl: {{ matrix_bot_draupnir_raw_homeserver_url | to_json }}
  12. # Matrix Access Token to use, Draupnir will only use this if pantalaimon.use is false.
  13. # This option can be loaded from a file by passing "--access-token-path <path>" at the command line,
  14. # which would allow using secret management systems such as systemd's service credentials.
  15. accessToken: {{ matrix_bot_draupnir_access_token | to_json }}
  16. {% if matrix_bot_draupnir_pantalaimon_use or matrix_bot_draupnir_login_native %}
  17. # Options related to Pantalaimon (https://github.com/matrix-org/pantalaimon)
  18. pantalaimon:
  19. # Set to `true` when the bot is to login and fetch the access token on its own.
  20. #
  21. # Draupnir will log in using the given username and password once,
  22. # then store the resulting access token in a file under dataPath.
  23. use: true
  24. # The username to login with.
  25. username: {{ matrix_bot_draupnir_login | to_json }}
  26. # The password Draupnir will login with.
  27. #
  28. # After successfully logging in once, this will be ignored, so this value can be blanked after first startup.
  29. # This option can be loaded from a file by passing "--password-path <path>" at the command line,
  30. # which would allow using secret management systems such as systemd's service credentials.
  31. password: {{ matrix_bot_draupnir_password | to_json }}
  32. {% endif %}
  33. # Experimental usage of the matrix-bot-sdk rust crypto. This can not be used with Pantalaimon.
  34. # Make sure Pantalaimon is disabled in Draupnir's configuration.
  35. #
  36. # Warning: At this time this is not considered production safe.
  37. experimentalRustCrypto: {{ matrix_bot_draupnir_enable_experimental_rust_crypto | to_json }}
  38. # The path Draupnir will store its state/data in, leave default ("/data/storage") when using containers.
  39. dataPath: "/data"
  40. # If true (the default), Draupnir will only accept invites from users present in managementRoom.
  41. autojoinOnlyIfManager: true
  42. # If `autojoinOnlyIfManager` is false, only the members in this space can invite
  43. # the bot to new rooms.
  44. #acceptInvitesFromSpace: "!qporfwt:example.com"
  45. # Whether Draupnir should report ignored invites to the management room (if autojoinOnlyIfManager is true).
  46. recordIgnoredInvites: false
  47. # The room ID (or room alias) of the management room, anyone in this room can issue commands to Draupnir.
  48. #
  49. # Draupnir has no more granular access controls other than this, be sure you trust everyone in this room - secure it!
  50. #
  51. # This should be a room alias or room ID - not a matrix.to URL.
  52. #
  53. # Note: By default, Draupnir is fairly verbose - expect a lot of messages in this room.
  54. # (see verboseLogging to adjust this a bit.)
  55. managementRoom: {{ matrix_bot_draupnir_management_room | to_json }}
  56. # Deprecated and will be removed in a future version.
  57. # Running with verboseLogging is unsupported.
  58. # Whether Draupnir should log a lot more messages in the room,
  59. # mainly involves "all-OK" messages, and debugging messages for when Draupnir checks bans in a room.
  60. verboseLogging: false
  61. # The log level of terminal (or container) output,
  62. # can be one of DEBUG, INFO, WARN and ERROR, in increasing order of importance and severity.
  63. #
  64. # This should be at INFO or DEBUG in order to get support for Draupnir problems.
  65. logLevel: "INFO"
  66. # Whether or not Draupnir should synchronize policy lists immediately after startup.
  67. # Equivalent to running '!draupnir sync'.
  68. syncOnStartup: true
  69. # Whether or not Draupnir should check moderation permissions in all protected rooms on startup.
  70. # Equivalent to running `!draupnir verify`.
  71. verifyPermissionsOnStartup: true
  72. # Whether or not Draupnir should actually apply bans and policy lists,
  73. # turn on to trial some untrusted configuration or lists.
  74. noop: false
  75. # Whether or not Draupnir should apply `m.room.server_acl` events.
  76. # DO NOT change this to `true` unless you are very confident that you know what you are doing.
  77. disableServerACL: {{ matrix_bot_draupnir_disable_server_acl | to_json }}
  78. # A case-insensitive list of ban reasons to have the bot also automatically redact the user's messages for.
  79. #
  80. # If the bot sees you ban a user with a reason that is an (exact case-insensitive) match to this list,
  81. # it will also remove the user's messages automatically.
  82. #
  83. # Typically this is useful to avoid having to give two commands to the bot.
  84. # Advanced: Use asterisks to have the reason match using "globs"
  85. # (f.e. "spam*testing" would match "spam for testing" as well as "spamtesting").
  86. #
  87. # See here for more info: https://www.digitalocean.com/community/tools/glob
  88. # Note: Keep in mind that glob is NOT regex!
  89. automaticallyRedactForReasons:
  90. - "spam"
  91. - "advertising"
  92. # Whether or not to add all joined rooms to the "protected rooms" list
  93. # (excluding the management room and watched policy list rooms, see below).
  94. #
  95. # Note that this effectively makes the protectedRooms and associated commands useless
  96. # for regular rooms.
  97. #
  98. # Note: the management room is *excluded* from this condition.
  99. # Explicitly add it as a protected room to protect it.
  100. #
  101. # Note: Ban list rooms the bot is watching but didn't create will not be protected.
  102. # Explicitly add these rooms as a protected room list if you want them protected.
  103. protectAllJoinedRooms: false
  104. # Increase this delay to have Draupnir wait longer between two consecutive backgrounded
  105. # operations. The total duration of operations will be longer, but the homeserver won't
  106. # be affected as much. Conversely, decrease this delay to have Draupnir chain operations
  107. # faster. The total duration of operations will generally be shorter, but the performance
  108. # of the homeserver may be more impacted.
  109. backgroundDelayMS: 500
  110. # FIXME: This configuration option is currently broken in the playbook as admin APIs cannot
  111. # be accessed from containers. See https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3389
  112. # and https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3308
  113. # Server administration commands, these commands will only work if Draupnir is
  114. # a global server administrator, and the bot's server is a Synapse instance.
  115. #admin:
  116. # # Whether or not Draupnir can temporarily take control of any eligible account from the local homeserver who's in the room
  117. # # (with enough permissions) to "make" a user an admin.
  118. # #
  119. # # This only works if a local user with enough admin permissions is present in the room.
  120. # enableMakeRoomAdminCommand: false
  121. #
  122. # Misc options for command handling and commands
  123. commands:
  124. # Whether or not the `!draupnir` prefix is necessary to submit commands.
  125. #
  126. # If `true`, will allow commands like `!ban`, `!help`, etc.
  127. #
  128. # Note: Draupnir can also be pinged by display name instead of having to use
  129. # the !draupnir prefix. For example, "my_moderator_bot: ban @spammer:example.org"
  130. # will address only my_moderator_bot.
  131. allowNoPrefix: false
  132. # Any additional bot prefixes that Draupnir will listen to. i.e. adding `mod` will allow `!mod help`.
  133. additionalPrefixes:
  134. - "draupnir-bot"
  135. - "draupnir_bot"
  136. - "draupnir"
  137. # The default reasons to be prompted with if the reason is missing from a ban command.
  138. ban:
  139. defaultReasons:
  140. - "spam"
  141. - "brigading"
  142. - "harassment"
  143. - "disagreement"
  144. # Configuration specific to certain toggle-able protections
  145. #protections:
  146. # # Configuration for the wordlist plugin, which can ban users based if they say certain
  147. # # blocked words shortly after joining.
  148. # wordlist:
  149. # # A list of case-insensitive keywords that the WordList protection will watch for from new users.
  150. # #
  151. # # WordList will ban users who use these words when first joining a room, so take caution when selecting them.
  152. # #
  153. # # The word list protection does not support regular expressions at this time.
  154. # # The configuration in the past stated support for Regex erroneously.
  155. # #
  156. # words:
  157. # - "LoReM"
  158. # - "IpSuM"
  159. # - "DoLoR"
  160. # - "aMeT"
  161. #
  162. # # For how long (in minutes) the user is "new" to the WordList plugin.
  163. # #
  164. # # After this time, the user will no longer be banned for using a word in the above wordlist.
  165. # #
  166. # # Set to zero to disable the timeout and make users *always* appear "new".
  167. # # (users will always be banned if they say a bad word)
  168. # minutesBeforeTrusting: 20
  169. # The room state backing store writes a copy of the room state for all protected
  170. # rooms to the data directory.
  171. # It is recommended to enable this option unless you deploy Draupnir close to the
  172. # homeserver and know that Draupnir is starting up quickly. If your homeserver can
  173. # respond quickly to Draupnir's requests for `/state` then you might not need this option.
  174. roomStateBackingStore:
  175. enabled: {{ matrix_bot_draupnir_enable_room_state_backing_store | to_json }}
  176. # Safe mode provides recovery options for some failure modes when Draupnir
  177. # fails to start. For example, if the bot fails to resolve a room alias in
  178. # a watched list, or if the server has parted from a protected room and can't
  179. # find a way back in. Safe mode will provide different options to recover from
  180. # these. Such as unprotecting the room or unwatching the policy list.
  181. # By default Draupnir will boot into safe mode only when the failure mode
  182. # is recoverable.
  183. # It may be desirable to prevent the bot from starting into safe mode if you have
  184. # a pager system when Draupnir is down, as Draupnir could prevent your monitoring
  185. # system from identifying a failure to start.
  186. #safeMode:
  187. # # The option for entering safe mode when Draupnir fails to start up.
  188. # # - "RecoveryOnly" will only start the bot in safe mode when there are recovery options available. This is the default.
  189. # # - "Never" will never start the bot in safe mode when Draupnir fails to start normally.
  190. # # - "Always" will always start the bot in safe mode when Draupnir fails to start normally.
  191. # bootOption: RecoveryOnly
  192. # Options for advanced monitoring of the health of the bot.
  193. health:
  194. # healthz options. These options are best for use in container environments
  195. # like Kubernetes to detect how healthy the service is. The bot will report
  196. # that it is unhealthy until it is able to process user requests. Typically
  197. # this means that it'll flag itself as unhealthy for a number of minutes
  198. # before saying "Now monitoring rooms" and flagging itself healthy.
  199. #
  200. # Health is flagged through HTTP status codes, defined below.
  201. healthz:
  202. # Whether the healthz integration should be enabled (default false)
  203. enabled: false
  204. # The port to expose the webserver on. Defaults to 8080.
  205. port: 8080
  206. # The address to listen for requests on. Defaults to all addresses.
  207. address: "0.0.0.0"
  208. # The path to expose the monitoring endpoint at. Defaults to `/healthz`
  209. endpoint: "/healthz"
  210. # The HTTP status code which reports that the bot is healthy/ready to
  211. # process requests. Typically this should not be changed. Defaults to
  212. # 200.
  213. healthyStatus: 200
  214. # The HTTP status code which reports that the bot is not healthy/ready.
  215. # Defaults to 418.
  216. unhealthyStatus: 418
  217. # Sentry options. Sentry is a tool used to receive/collate/triage runtime
  218. # errors and performance issues. Skip this section if you do not wish to use
  219. # Sentry.
  220. sentry:
  221. # The key used to upload Sentry data to the server.
  222. # dsn: "https://XXXXXXXXX@example.com/YYY
  223. # Frequency of performance monitoring.
  224. # A number in [0.0, 1.0], where 0.0 means "don't bother with tracing"
  225. # and 1.0 means "trace performance at every opportunity".
  226. # tracesSampleRate: 0.5
  227. {% if matrix_bot_draupnir_web_enabled %}
  228. # Options for exposing web APIs.
  229. web:
  230. # Whether to enable web APIs.
  231. enabled: true
  232. # The port to expose the webserver on. Defaults to 8080.
  233. port: 8080
  234. # The address to listen for requests on. Defaults to only the current
  235. # computer.
  236. address: "0.0.0.0"
  237. # Alternative setting to open to the entire web. Be careful,
  238. # as this will increase your security perimeter:
  239. #
  240. # address: "0.0.0.0"
  241. # A web API designed to intercept Matrix API
  242. # POST /_matrix/client/r0/rooms/{roomId}/report/{eventId}
  243. # and display readable abuse reports in the moderation room.
  244. #
  245. # If you wish to take advantage of this feature, you will need
  246. # to configure a reverse proxy, see e.g. test/nginx.conf
  247. abuseReporting:
  248. # Whether to enable this feature.
  249. enabled: {{ matrix_bot_draupnir_abuse_reporting_enabled | to_json }}
  250. {% endif %}
  251. # FIXME: This configuration option is currently broken in the playbook as admin APIs cannot
  252. # be accessed from containers. See https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3389
  253. # and https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3308
  254. # Whether or not to actively poll synapse for abuse reports, to be used
  255. # instead of intercepting client calls to synapse's abuse endpoint, when that
  256. # isn't possible/practical.
  257. #pollReports: false
  258. # Whether or not new reports, received either by webapi or polling,
  259. # should be printed to our managementRoom.
  260. displayReports: {{ matrix_bot_draupnir_display_reports | to_json }}