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.
 
 

268 lines
11 KiB

  1. {#
  2. SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  3. SPDX-License-Identifier: AGPL-3.0-or-later
  4. #}
  5. # Endpoint URL that Draupnir uses to interact with the Matrix homeserver (client-server API),
  6. # set this to the pantalaimon URL if you're using that.
  7. homeserverUrl: {{ matrix_bot_draupnir_homeserver_url | to_json }}
  8. # Endpoint URL that Draupnir could use to fetch events related to reports (client-server API and /_synapse/),
  9. # only set this to the public-internet homeserver client API URL, do NOT set this to the pantalaimon URL.
  10. rawHomeserverUrl: {{ matrix_bot_draupnir_raw_homeserver_url | to_json }}
  11. # Matrix Access Token to use, Draupnir will only use this if pantalaimon.use is false.
  12. accessToken: {{ matrix_bot_draupnir_access_token | to_json }}
  13. {% if matrix_bot_draupnir_pantalaimon_use %}
  14. # Options related to Pantalaimon (https://github.com/matrix-org/pantalaimon)
  15. pantalaimon:
  16. # Whether or not Draupnir will use pantalaimon to access the Matrix homeserver,
  17. # set to `true` if you're using pantalaimon.
  18. #
  19. # Be sure to point homeserverUrl to the pantalaimon instance.
  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_pantalaimon_username | 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. password: {{ matrix_bot_draupnir_pantalaimon_password | to_json }}
  30. {% endif %}
  31. # The path Draupnir will store its state/data in, leave default ("/data/storage") when using containers.
  32. dataPath: "/data"
  33. # If true (the default), Draupnir will only accept invites from users present in managementRoom.
  34. autojoinOnlyIfManager: true
  35. # If `autojoinOnlyIfManager` is false, only the members in this space can invite
  36. # the bot to new rooms.
  37. #acceptInvitesFromSpace: "!qporfwt:example.com"
  38. # Whether Draupnir should report ignored invites to the management room (if autojoinOnlyIfManager is true).
  39. recordIgnoredInvites: false
  40. # The room ID (or room alias) of the management room, anyone in this room can issue commands to Draupnir.
  41. #
  42. # Draupnir has no more granular access controls other than this, be sure you trust everyone in this room - secure it!
  43. #
  44. # This should be a room alias or room ID - not a matrix.to URL.
  45. #
  46. # Note: By default, Draupnir is fairly verbose - expect a lot of messages in this room.
  47. # (see verboseLogging to adjust this a bit.)
  48. managementRoom: {{ matrix_bot_draupnir_management_room | to_json }}
  49. # Deprecated and will be removed in a future version.
  50. # Running with verboseLogging is unsupported.
  51. # Whether Draupnir should log a lot more messages in the room,
  52. # mainly involves "all-OK" messages, and debugging messages for when Draupnir checks bans in a room.
  53. #verboseLogging: false
  54. # The log level of terminal (or container) output,
  55. # can be one of DEBUG, INFO, WARN and ERROR, in increasing order of importance and severity.
  56. #
  57. # This should be at INFO or DEBUG in order to get support for Draupnir problems.
  58. logLevel: "INFO"
  59. # Whether or not Draupnir should synchronize policy lists immediately after startup.
  60. # Equivalent to running '!draupnir sync'.
  61. syncOnStartup: true
  62. # Whether or not Draupnir should check moderation permissions in all protected rooms on startup.
  63. # Equivalent to running `!draupnir verify`.
  64. verifyPermissionsOnStartup: true
  65. # Whether or not Draupnir should actually apply bans and policy lists,
  66. # turn on to trial some untrusted configuration or lists.
  67. noop: false
  68. # Whether or not Draupnir should apply `m.room.server_acl` events.
  69. # DO NOT change this to `true` unless you are very confident that you know what you are doing.
  70. disableServerACL: {{ matrix_bot_draupnir_disable_server_acl | to_json }}
  71. # Whether Draupnir should check member lists quicker (by using a different endpoint),
  72. # keep in mind that enabling this will miss invited (but not joined) users.
  73. #
  74. # Turn on if your bot is in (very) large rooms, or in large amounts of rooms.
  75. fasterMembershipChecks: false
  76. # A case-insensitive list of ban reasons to have the bot also automatically redact the user's messages for.
  77. #
  78. # If the bot sees you ban a user with a reason that is an (exact case-insensitive) match to this list,
  79. # it will also remove the user's messages automatically.
  80. #
  81. # Typically this is useful to avoid having to give two commands to the bot.
  82. # Advanced: Use asterisks to have the reason match using "globs"
  83. # (f.e. "spam*testing" would match "spam for testing" as well as "spamtesting").
  84. #
  85. # See here for more info: https://www.digitalocean.com/community/tools/glob
  86. # Note: Keep in mind that glob is NOT regex!
  87. automaticallyRedactForReasons:
  88. - "spam"
  89. - "advertising"
  90. # A list of rooms to protect. Draupnir will add this to the list it knows from its account data.
  91. #
  92. # It won't, however, add it to the account data.
  93. # Manually add the room via '!draupnir rooms add' to have it stay protected regardless if this config value changes.
  94. #
  95. # Note: These must be matrix.to URLs
  96. #protectedRooms:
  97. # - "https://matrix.to/#/#matrix:example.org"
  98. # Whether or not to add all joined rooms to the "protected rooms" list
  99. # (excluding the management room and watched policy list rooms, see below).
  100. #
  101. # Note that this effectively makes the protectedRooms and associated commands useless
  102. # for regular rooms.
  103. #
  104. # Note: the management room is *excluded* from this condition.
  105. # Explicitly add it as a protected room to protect it.
  106. #
  107. # Note: Ban list rooms the bot is watching but didn't create will not be protected.
  108. # Explicitly add these rooms as a protected room list if you want them protected.
  109. protectAllJoinedRooms: false
  110. # Increase this delay to have Draupnir wait longer between two consecutive backgrounded
  111. # operations. The total duration of operations will be longer, but the homeserver won't
  112. # be affected as much. Conversely, decrease this delay to have Draupnir chain operations
  113. # faster. The total duration of operations will generally be shorter, but the performance
  114. # of the homeserver may be more impacted.
  115. backgroundDelayMS: 500
  116. # Server administration commands, these commands will only work if Draupnir is
  117. # a global server administrator, and the bot's server is a Synapse instance.
  118. admin:
  119. # Whether or not Draupnir can temporarily take control of any eligible account from the local homeserver who's in the room
  120. # (with enough permissions) to "make" a user an admin.
  121. #
  122. # This only works if a local user with enough admin permissions is present in the room.
  123. enableMakeRoomAdminCommand: false
  124. # Misc options for command handling and commands
  125. commands:
  126. # Whether or not the `!draupnir` prefix is necessary to submit commands.
  127. #
  128. # If `true`, will allow commands like `!ban`, `!help`, etc.
  129. #
  130. # Note: Draupnir can also be pinged by display name instead of having to use
  131. # the !draupnir prefix. For example, "my_moderator_bot: ban @spammer:example.org"
  132. # will address only my_moderator_bot.
  133. allowNoPrefix: false
  134. # Any additional bot prefixes that Draupnir will listen to. i.e. adding `mod` will allow `!mod help`.
  135. additionalPrefixes:
  136. - "draupnir-bot"
  137. - "draupnir_bot"
  138. - "draupnir"
  139. # Whether or not commands with a wildcard (*) will require an additional `--force` argument
  140. # in the command to be able to be submitted.
  141. confirmWildcardBan: true
  142. # The default reasons to be prompted with if the reason is missing from a ban command.
  143. ban:
  144. defaultReasons:
  145. - "spam"
  146. - "brigading"
  147. - "harassment"
  148. - "disagreement"
  149. # Configuration specific to certain toggle-able protections
  150. #protections:
  151. # # Configuration for the wordlist plugin, which can ban users based if they say certain
  152. # # blocked words shortly after joining.
  153. # wordlist:
  154. # # A list of case-insensitive keywords that the WordList protection will watch for from new users.
  155. # #
  156. # # WordList will ban users who use these words when first joining a room, so take caution when selecting them.
  157. # #
  158. # # For advanced usage, regex can also be used, see the following links for more information;
  159. # # - https://www.digitalocean.com/community/tutorials/an-introduction-to-regular-expressions
  160. # # - https://regexr.com/
  161. # # - https://regexone.com/
  162. # words:
  163. # - "LoReM"
  164. # - "IpSuM"
  165. # - "DoLoR"
  166. # - "aMeT"
  167. #
  168. # # For how long (in minutes) the user is "new" to the WordList plugin.
  169. # #
  170. # # After this time, the user will no longer be banned for using a word in the above wordlist.
  171. # #
  172. # # Set to zero to disable the timeout and make users *always* appear "new".
  173. # # (users will always be banned if they say a bad word)
  174. # minutesBeforeTrusting: 20
  175. # Options for advanced monitoring of the health of the bot.
  176. health:
  177. # healthz options. These options are best for use in container environments
  178. # like Kubernetes to detect how healthy the service is. The bot will report
  179. # that it is unhealthy until it is able to process user requests. Typically
  180. # this means that it'll flag itself as unhealthy for a number of minutes
  181. # before saying "Now monitoring rooms" and flagging itself healthy.
  182. #
  183. # Health is flagged through HTTP status codes, defined below.
  184. healthz:
  185. # Whether the healthz integration should be enabled (default false)
  186. enabled: false
  187. # The port to expose the webserver on. Defaults to 8080.
  188. port: 8080
  189. # The address to listen for requests on. Defaults to all addresses.
  190. address: "0.0.0.0"
  191. # The path to expose the monitoring endpoint at. Defaults to `/healthz`
  192. endpoint: "/healthz"
  193. # The HTTP status code which reports that the bot is healthy/ready to
  194. # process requests. Typically this should not be changed. Defaults to
  195. # 200.
  196. healthyStatus: 200
  197. # The HTTP status code which reports that the bot is not healthy/ready.
  198. # Defaults to 418.
  199. unhealthyStatus: 418
  200. {% if matrix_bot_draupnir_web_enabled %}
  201. # Options for exposing web APIs.
  202. web:
  203. # Whether to enable web APIs.
  204. enabled: true
  205. # The port to expose the webserver on. Defaults to 8080.
  206. port: 8080
  207. # The address to listen for requests on. Defaults to only the current
  208. # computer.
  209. address: 0.0.0.0
  210. # A web API designed to intercept Matrix API
  211. # POST /_matrix/client/r0/rooms/{roomId}/report/{eventId}
  212. # and display readable abuse reports in the moderation room.
  213. #
  214. # If you wish to take advantage of this feature, you will need
  215. # to configure a reverse proxy, see e.g. test/nginx.conf
  216. abuseReporting:
  217. # Whether to enable this feature.
  218. enabled: {{ matrix_bot_draupnir_abuse_reporting_enabled | to_json }}
  219. {% endif %}
  220. # Whether or not to actively poll synapse for abuse reports, to be used
  221. # instead of intercepting client calls to synapse's abuse endpoint, when that
  222. # isn't possible/practical.
  223. pollReports: false
  224. # Whether or not new reports, received either by webapi or polling,
  225. # should be printed to our managementRoom.
  226. displayReports: {{ matrix_bot_draupnir_display_reports | to_json }}