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.
 
 

301 line
13 KiB

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