Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

361 lignes
18 KiB

  1. # SPDX-FileCopyrightText: 2021 - 2024 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2021 Yannick Goossens
  3. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  4. # SPDX-FileCopyrightText: 2022 Nikita Chernyi
  5. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  6. # SPDX-FileCopyrightText: 2024 Suguru Hirahara
  7. #
  8. # SPDX-License-Identifier: AGPL-3.0-or-later
  9. ---
  10. # Go-NEB is a Matrix bot written in Go. It is the successor to Matrix-NEB, the original Matrix bot written in Python.
  11. # Project source code URL: https://github.com/matrix-org/go-neb
  12. matrix_bot_go_neb_enabled: true
  13. # renovate: datasource=docker depName=matrixdotorg/go-neb
  14. matrix_bot_go_neb_version: latest
  15. matrix_bot_go_neb_scheme: https
  16. # The hostname at which Go-NEB is served.
  17. matrix_bot_go_neb_hostname: ''
  18. # The path at which Go-NEB is exposed.
  19. # This value must either be `/` or not end with a slash (e.g. `/go-neb`).
  20. matrix_bot_go_neb_path_prefix: /
  21. matrix_bot_go_neb_base_url: "{{ matrix_bot_go_neb_scheme }}://{{ matrix_bot_go_neb_hostname }}{{ matrix_bot_go_neb_path_prefix }}{{ '' if matrix_bot_go_neb_path_prefix == '/' else '/' }}"
  22. matrix_bot_go_neb_base_path: "{{ matrix_base_data_path }}/go-neb"
  23. matrix_bot_go_neb_config_path: "{{ matrix_bot_go_neb_base_path }}/config"
  24. matrix_bot_go_neb_config_path_in_container: "/config/config.yaml"
  25. matrix_bot_go_neb_data_path: "{{ matrix_bot_go_neb_base_path }}/data"
  26. matrix_bot_go_neb_data_store_path: "{{ matrix_bot_go_neb_data_path }}/store"
  27. matrix_bot_go_neb_container_image: "{{ matrix_bot_go_neb_container_image_registry_prefix }}matrixdotorg/go-neb:{{ matrix_bot_go_neb_container_image_tag }}"
  28. matrix_bot_go_neb_container_image_tag: "{{ matrix_bot_go_neb_version }}"
  29. matrix_bot_go_neb_container_image_force_pull: "{{ matrix_bot_go_neb_container_image.endswith(':latest') }}"
  30. matrix_bot_go_neb_container_image_registry_prefix: "{{ matrix_bot_go_neb_container_image_registry_prefix_upstream }}"
  31. matrix_bot_go_neb_container_image_registry_prefix_upstream: "{{ matrix_bot_go_neb_container_image_registry_prefix_upstream_default }}"
  32. matrix_bot_go_neb_container_image_registry_prefix_upstream_default: "docker.io/"
  33. # The base container network. It will be auto-created by this role if it doesn't exist already.
  34. matrix_bot_go_neb_container_network: matrix-bot-go-neb
  35. # A list of additional container networks that the container would be connected to.
  36. # The role does not create these networks, so make sure they already exist.
  37. # Use this to expose this container to another reverse proxy, which runs in a different container network.
  38. matrix_bot_go_neb_container_additional_networks: []
  39. # Controls whether the matrix-bot-go-neb container exposes its HTTP port (tcp/4050 in the container).
  40. #
  41. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:4050"), or empty string to not expose.
  42. matrix_bot_go_neb_container_http_host_bind_port: ''
  43. # matrix_bot_go_neb_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  44. # See `../templates/labels.j2` for details.
  45. #
  46. # To inject your own other container labels, see `matrix_bot_go_neb_container_labels_additional_labels`.
  47. matrix_bot_go_neb_container_labels_traefik_enabled: true
  48. matrix_bot_go_neb_container_labels_traefik_docker_network: "{{ matrix_bot_go_neb_container_network }}"
  49. matrix_bot_go_neb_container_labels_traefik_hostname: "{{ matrix_bot_go_neb_hostname }}"
  50. # The path prefix must either be `/` or not end with a slash (e.g. `/go-neb`).
  51. matrix_bot_go_neb_container_labels_traefik_path_prefix: "{{ matrix_bot_go_neb_path_prefix }}"
  52. matrix_bot_go_neb_container_labels_traefik_rule: "Host(`{{ matrix_bot_go_neb_container_labels_traefik_hostname }}`){% if matrix_bot_go_neb_container_labels_traefik_path_prefix != '/' %} && PathPrefix(`{{ matrix_bot_go_neb_container_labels_traefik_path_prefix }}`){% endif %}"
  53. matrix_bot_go_neb_container_labels_traefik_priority: 0
  54. matrix_bot_go_neb_container_labels_traefik_entrypoints: web-secure
  55. matrix_bot_go_neb_container_labels_traefik_tls: "{{ matrix_bot_go_neb_container_labels_traefik_entrypoints != 'web' }}"
  56. matrix_bot_go_neb_container_labels_traefik_tls_certResolver: default # noqa var-naming
  57. # Controls which additional headers to attach to all HTTP responses.
  58. # To add your own headers, use `matrix_bot_go_neb_container_labels_traefik_additional_response_headers_custom`
  59. matrix_bot_go_neb_container_labels_traefik_additional_response_headers: "{{ matrix_bot_go_neb_container_labels_traefik_additional_response_headers_auto | combine(matrix_bot_go_neb_container_labels_traefik_additional_response_headers_custom) }}"
  60. matrix_bot_go_neb_container_labels_traefik_additional_response_headers_auto: |
  61. {{
  62. {}
  63. | combine ({'X-XSS-Protection': matrix_bot_go_neb_http_header_xss_protection} if matrix_bot_go_neb_http_header_xss_protection else {})
  64. | combine ({'X-Frame-Options': matrix_bot_go_neb_http_header_frame_options} if matrix_bot_go_neb_http_header_frame_options else {})
  65. | combine ({'X-Content-Type-Options': matrix_bot_go_neb_http_header_content_type_options} if matrix_bot_go_neb_http_header_content_type_options else {})
  66. | combine ({'Content-Security-Policy': matrix_bot_go_neb_http_header_content_security_policy} if matrix_bot_go_neb_http_header_content_security_policy else {})
  67. | combine ({'Permission-Policy': matrix_bot_go_neb_http_header_content_permission_policy} if matrix_bot_go_neb_http_header_content_permission_policy else {})
  68. | combine ({'Strict-Transport-Security': matrix_bot_go_neb_http_header_strict_transport_security} if matrix_bot_go_neb_http_header_strict_transport_security and matrix_bot_go_neb_container_labels_traefik_tls else {})
  69. }}
  70. matrix_bot_go_neb_container_labels_traefik_additional_response_headers_custom: {}
  71. # matrix_bot_go_neb_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  72. # See `../templates/labels.j2` for details.
  73. #
  74. # Example:
  75. # matrix_bot_go_neb_container_labels_additional_labels: |
  76. # my.label=1
  77. # another.label="here"
  78. matrix_bot_go_neb_container_labels_additional_labels: ''
  79. # A list of extra arguments to pass to the container
  80. matrix_bot_go_neb_container_extra_arguments: []
  81. # List of systemd services that matrix-bot-go-neb.service depends on
  82. matrix_bot_go_neb_systemd_required_services_list: "{{ matrix_bot_go_neb_systemd_required_services_list_default + matrix_bot_go_neb_systemd_required_services_list_auto + matrix_bot_go_neb_systemd_required_services_list_custom }}"
  83. matrix_bot_go_neb_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  84. matrix_bot_go_neb_systemd_required_services_list_auto: []
  85. matrix_bot_go_neb_systemd_required_services_list_custom: []
  86. # List of systemd services that matrix-bot-go-neb.service wants
  87. matrix_bot_go_neb_systemd_wanted_services_list: []
  88. # Specifies the value of the `X-XSS-Protection` header
  89. # Stops pages from loading when they detect reflected cross-site scripting (XSS) attacks.
  90. #
  91. # Learn more about it is here:
  92. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
  93. # - https://portswigger.net/web-security/cross-site-scripting/reflected
  94. matrix_bot_go_neb_http_header_xss_protection: "1; mode=block"
  95. # Specifies the value of the `X-Frame-Options` header which controls whether framing can happen.
  96. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
  97. matrix_bot_go_neb_http_header_frame_options: SAMEORIGIN
  98. # Specifies the value of the `X-Content-Type-Options` header.
  99. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
  100. matrix_bot_go_neb_http_header_content_type_options: nosniff
  101. # Specifies the value of the `Content-Security-Policy` header.
  102. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
  103. matrix_bot_go_neb_http_header_content_security_policy: frame-ancestors 'self'
  104. # Specifies the value of the `Permission-Policy` header.
  105. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permission-Policy
  106. matrix_bot_go_neb_http_header_content_permission_policy: "{{ 'interest-cohort=()' if matrix_bot_go_neb_floc_optout_enabled else '' }}"
  107. # Specifies the value of the `Strict-Transport-Security` header.
  108. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  109. matrix_bot_go_neb_http_header_strict_transport_security: "max-age=31536000; includeSubDomains{{ '; preload' if matrix_bot_go_neb_hsts_preload_enabled else '' }}"
  110. # Controls whether to send a "Permissions-Policy interest-cohort=();" header along with all responses
  111. #
  112. # Learn more about what it is here:
  113. # - https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
  114. # - https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
  115. # - https://amifloced.org/
  116. #
  117. # Of course, a better solution is to just stop using browsers (like Chrome), which participate in such tracking practices.
  118. # See: `matrix_bot_go_neb_content_permission_policy`
  119. matrix_bot_go_neb_floc_optout_enabled: true
  120. # Controls if HSTS preloading is enabled
  121. #
  122. # In its strongest and recommended form, the [HSTS policy](https://www.chromium.org/hsts) includes all subdomains, and
  123. # indicates a willingness to be "preloaded" into browsers:
  124. # `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
  125. # For more information visit:
  126. # - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
  127. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  128. # - https://hstspreload.org/#opt-in
  129. # See: `matrix_bot_go_neb_http_header_strict_transport_security`
  130. matrix_bot_go_neb_hsts_preload_enabled: false
  131. # Database-related configuration fields.
  132. #
  133. # MUST be "sqlite3". No other type is supported.
  134. matrix_bot_go_neb_database_engine: 'sqlite3'
  135. matrix_bot_go_neb_sqlite_database_path_local: "{{ matrix_bot_go_neb_data_path }}/bot.db"
  136. matrix_bot_go_neb_sqlite_database_path_in_container: "/data/bot.db"
  137. matrix_bot_go_neb_storage_database: "{{
  138. {
  139. 'sqlite3': (matrix_bot_go_neb_sqlite_database_path_in_container + '?_busy_timeout=5000'),
  140. }[matrix_bot_go_neb_database_engine]
  141. }}"
  142. # The bot's username(s). These users need to be created manually beforehand.
  143. # The access tokens that the bot uses to authenticate.
  144. # Generate one as described in
  145. # https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook-dimension.md#access-token
  146. # via curl. With the Element method, you might run into decryption problems (see https://github.com/matrix-org/go-neb#quick-start)
  147. matrix_bot_go_neb_clients: []
  148. # - UserID: "@goneb:{{ matrix_domain }}"
  149. # AccessToken: "MDASDASJDIASDJASDAFGFRGER"
  150. # DeviceID: "DEVICE1"
  151. # HomeserverURL: "{{ matrix_addons_homeserver_client_api_url }}"
  152. # Sync: true
  153. # AutoJoinRooms: true
  154. # DisplayName: "Go-NEB!"
  155. # AcceptVerificationFromUsers: [":{{ matrix_domain }}"]
  156. #
  157. # - UserID: "@another_goneb:{{ matrix_domain }}"
  158. # AccessToken: "MDASDASJDIASDJASDAFGFRGER"
  159. # DeviceID: "DEVICE2"
  160. # HomeserverURL: "{{ matrix_addons_homeserver_client_api_url }}"
  161. # Sync: false
  162. # AutoJoinRooms: false
  163. # DisplayName: "Go-NEB!"
  164. # AcceptVerificationFromUsers: ["^@admin:{{ matrix_domain }}"]
  165. # The list of realms which Go-NEB is aware of.
  166. # Delete or modify this list as appropriate.
  167. # See the docs for /configureAuthRealm for the full list of options:
  168. # https://matrix-org.github.io/go-neb/pkg/github.com/matrix-org/go-neb/api/index.html#ConfigureAuthRealmRequest
  169. matrix_bot_go_neb_realms: []
  170. # - ID: "github_realm"
  171. # Type: "github"
  172. # Config: {} # No need for client ID or Secret as Go-NEB isn't generating OAuth URLs
  173. # The list of *authenticated* sessions which Go-NEB is aware of.
  174. # Delete or modify this list as appropriate.
  175. # The full list of options are shown below: there is no single HTTP endpoint
  176. # which maps to this section.
  177. # https://matrix-org.github.io/go-neb/pkg/github.com/matrix-org/go-neb/api/index.html#Session
  178. matrix_bot_go_neb_sessions: []
  179. # - SessionID: "your_github_session"
  180. # RealmID: "github_realm"
  181. # UserID: "@alice:{{ matrix_domain }}" # This needs to be the username of the person that's allowed to use the !github commands
  182. # Config:
  183. # # Populate these fields by generating a "Personal Access Token" on github.com
  184. # AccessToken: "YOUR_GITHUB_ACCESS_TOKEN"
  185. # Scopes: "admin:org_hook,admin:repo_hook,repo,user"
  186. # The list of services which Go-NEB is aware of.
  187. # Delete or modify this list as appropriate.
  188. # See the docs for /configureService for the full list of options:
  189. # https://matrix-org.github.io/go-neb/pkg/github.com/matrix-org/go-neb/api/index.html#ConfigureServiceRequest
  190. matrix_bot_go_neb_services: []
  191. # - ID: "echo_service"
  192. # Type: "echo"
  193. # UserID: "@goneb:{{ matrix_domain }}"
  194. # Config: {}
  195. ## Can be obtained from https://developers.giphy.com/dashboard/
  196. # - ID: "giphy_service"
  197. # Type: "giphy"
  198. # UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
  199. # Config:
  200. # api_key: "qwg4672vsuyfsfe"
  201. # use_downsized: false
  202. #
  203. ## This service has been dead for over a year :/
  204. # - ID: "guggy_service"
  205. # Type: "guggy"
  206. # UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
  207. # Config:
  208. # api_key: "2356saaqfhgfe"
  209. #
  210. ## API Key via https://developers.google.com/custom-search/v1/introduction
  211. ## CX via http://www.google.com/cse/manage/all
  212. ## https://stackoverflow.com/questions/6562125/getting-a-cx-id-for-custom-search-google-api-python
  213. ## 'Search the entire web' and 'Image search' enabled for best results
  214. # - ID: "google_service"
  215. # Type: "google"
  216. # UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
  217. # Config:
  218. # api_key: "AIzaSyA4FD39m9"
  219. # cx: "AIASDFWSRRtrtr"
  220. #
  221. ## Get a key via https://api.imgur.com/oauth2/addclient
  222. ## Select "oauth2 without callback url"
  223. # - ID: "imgur_service"
  224. # Type: "imgur"
  225. # UserID: "@imgur:{{ matrix_domain }}" # requires a Syncing client
  226. # Config:
  227. # client_id: "AIzaSyA4FD39m9"
  228. # client_secret: "somesecret"
  229. #
  230. # - ID: "wikipedia_service"
  231. # Type: "wikipedia"
  232. # UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
  233. # Config:
  234. #
  235. # - ID: "rss_service"
  236. # Type: "rssbot"
  237. # UserID: "@another_goneb:{{ matrix_domain }}"
  238. # Config:
  239. # feeds:
  240. # "http://lorem-rss.herokuapp.com/feed?unit=second&interval=60":
  241. # rooms: ["!qporfwt:localhost"]
  242. # must_include:
  243. # author:
  244. # - author1
  245. # description:
  246. # - lorem
  247. # - ipsum
  248. # must_not_include:
  249. # title:
  250. # - Lorem
  251. # - Ipsum
  252. #
  253. # - ID: "github_cmd_service"
  254. # Type: "github"
  255. # UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
  256. # Config:
  257. # RealmID: "github_realm"
  258. #
  259. # # Make sure your BASE_URL can be accessed by Github!
  260. # - ID: "github_webhook_service"
  261. # Type: "github-webhook"
  262. # UserID: "@another_goneb:{{ matrix_domain }}"
  263. # Config:
  264. # RealmID: "github_realm"
  265. # ClientUserID: "@alice:{{ matrix_domain }}" # needs to be an authenticated user so Go-NEB can create webhooks. Check the UserID field in the github_realm in matrix_bot_go_neb_sessions.
  266. # Rooms:
  267. # "!qporfwt:example.com":
  268. # Repos:
  269. # "element-hq/synapse":
  270. # Events: ["push", "issues"]
  271. # "matrix-org/dendron":
  272. # Events: ["pull_request"]
  273. # "!aaabaa:example.com":
  274. # Repos:
  275. # "element-hq/synapse":
  276. # Events: ["push", "issues"]
  277. # "matrix-org/dendron":
  278. # Events: ["pull_request"]
  279. #
  280. # - ID: "slackapi_service"
  281. # Type: "slackapi"
  282. # UserID: "@slackapi:{{ matrix_domain }}"
  283. # Config:
  284. # Hooks:
  285. # "hook1":
  286. # RoomID: "!qporfwt:example.com"
  287. # MessageType: "m.text" # default is m.text
  288. #
  289. # - ID: "alertmanager_service"
  290. # Type: "alertmanager"
  291. # UserID: "@alertmanager:{{ matrix_domain }}"
  292. # Config:
  293. # # This is for information purposes only. It should point to Go-NEB path as follows:
  294. # # `/services/hooks/<base64 encoded service ID>`
  295. # # Where in this case "service ID" is "alertmanager_service"
  296. # # Make sure your BASE_URL can be accessed by the Alertmanager instance!
  297. # webhook_url: "http://localhost/services/hooks/YWxlcnRtYW5hZ2VyX3NlcnZpY2U"
  298. # # Each room will get the notification with the alert rendered with the given template
  299. # rooms:
  300. # "!qporfwt:example.com":
  301. # text_template: "{% raw %}{{range .Alerts -}} [{{ .Status }}] {{index .Labels \"alertname\"}}: {{index .Annotations \"description\"}} {{ end -}}{% endraw %}"
  302. # html_template: "{% raw %}{{range .Alerts -}} {{ $severity := index .Labels \"severity\"}} {{ if eq .Status \"firing\"}} {{ if eq $severity \"critical\"}} <font color='red'><b>[FIRING - CRITICAL]</b></font> {{ else if eq $severity \"warning\"}} <font color='orange'><b>[FIRING - WARNING]</b></font> {{ else }} <b>[FIRING - {{ $severity }}]</b> {{ end }} {{ else }} <font color='green'><b>[RESOLVED]</b></font> {{ end }} {{ index .Labels \"alertname\"}} : {{ index .Annotations \"description\"}} <a href=\"{{ .GeneratorURL }}\">source</a><br/>{{end -}}{% endraw %}"
  303. # msg_type: "m.text" # Must be either `m.text` or `m.notice`
  304. # Default configuration template which covers the generic use case.
  305. # You can customize it by controlling the various variables inside it.
  306. #
  307. # For a more advanced customization, you can extend the default (see `matrix_bot_go_neb_configuration_extension_yaml`)
  308. # or completely replace this variable with your own template.
  309. matrix_bot_go_neb_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  310. matrix_bot_go_neb_configuration_extension_yaml: |
  311. # Your custom YAML configuration goes here.
  312. # This configuration extends the default starting configuration (`matrix_bot_go_neb_configuration_yaml`).
  313. #
  314. # You can override individual variables from the default configuration, or introduce new ones.
  315. #
  316. # If you need something more special, you can take full control by
  317. # completely redefining `matrix_bot_go_neb_configuration_yaml`.
  318. matrix_bot_go_neb_configuration_extension: "{{ matrix_bot_go_neb_configuration_extension_yaml | from_yaml if matrix_bot_go_neb_configuration_extension_yaml | from_yaml is mapping else {} }}"
  319. # Holds the final configuration (a combination of the default and its extension).
  320. # You most likely don't need to touch this variable. Instead, see `matrix_bot_go_neb_configuration_yaml`.
  321. matrix_bot_go_neb_configuration: "{{ matrix_bot_go_neb_configuration_yaml | from_yaml | combine(matrix_bot_go_neb_configuration_extension, recursive=True) }}"