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.
 
 

296 line
13 KiB

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