Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

366 wiersze
19 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-Content-Type-Options': matrix_bot_go_neb_http_header_content_type_options} if matrix_bot_go_neb_http_header_content_type_options else {})
  65. | combine ({'Content-Security-Policy': matrix_bot_go_neb_http_header_content_security_policy} if matrix_bot_go_neb_http_header_content_security_policy else {})
  66. | combine ({'Permission-Policy': matrix_bot_go_neb_http_header_content_permission_policy} if matrix_bot_go_neb_http_header_content_permission_policy else {})
  67. | 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 {})
  68. }}
  69. matrix_bot_go_neb_container_labels_traefik_additional_response_headers_custom: {}
  70. # matrix_bot_go_neb_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  71. # See `../templates/labels.j2` for details.
  72. #
  73. # Example:
  74. # matrix_bot_go_neb_container_labels_additional_labels: |
  75. # my.label=1
  76. # another.label="here"
  77. matrix_bot_go_neb_container_labels_additional_labels: ''
  78. # A list of extra arguments to pass to the container
  79. matrix_bot_go_neb_container_extra_arguments: []
  80. # List of systemd services that matrix-bot-go-neb.service depends on
  81. 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 }}"
  82. 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 [] }}"
  83. matrix_bot_go_neb_systemd_required_services_list_auto: []
  84. matrix_bot_go_neb_systemd_required_services_list_custom: []
  85. # List of systemd services that matrix-bot-go-neb.service wants
  86. matrix_bot_go_neb_systemd_wanted_services_list: []
  87. # Specifies the value of the `X-XSS-Protection` header
  88. # Stops pages from loading when they detect reflected cross-site scripting (XSS) attacks.
  89. #
  90. # Learn more about it is here:
  91. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
  92. # - https://portswigger.net/web-security/cross-site-scripting/reflected
  93. matrix_bot_go_neb_http_header_xss_protection: "1; mode=block"
  94. # Specifies the value of the `X-Content-Type-Options` header.
  95. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
  96. matrix_bot_go_neb_http_header_content_type_options: nosniff
  97. # Specifies the value of the `Content-Security-Policy` header.
  98. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
  99. matrix_bot_go_neb_http_header_content_security_policy: frame-ancestors 'self'
  100. # Specifies the value of the `Permission-Policy` header.
  101. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permission-Policy
  102. matrix_bot_go_neb_http_header_content_permission_policy: "{{ 'interest-cohort=()' if matrix_bot_go_neb_floc_optout_enabled else '' }}"
  103. # Specifies the value of the `Strict-Transport-Security` header.
  104. # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  105. matrix_bot_go_neb_http_header_strict_transport_security: "max-age=31536000; includeSubDomains{{ '; preload' if matrix_bot_go_neb_hsts_preload_enabled else '' }}"
  106. # Controls whether to send a "Permissions-Policy interest-cohort=();" header along with all responses
  107. #
  108. # Learn more about what it is here:
  109. # - https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
  110. # - https://paramdeo.com/blog/opting-your-website-out-of-googles-floc-network
  111. # - https://amifloced.org/
  112. #
  113. # Of course, a better solution is to just stop using browsers (like Chrome), which participate in such tracking practices.
  114. # See: `matrix_bot_go_neb_content_permission_policy`
  115. matrix_bot_go_neb_floc_optout_enabled: true
  116. # Controls if HSTS preloading is enabled
  117. #
  118. # In its strongest and recommended form, the [HSTS policy](https://www.chromium.org/hsts) includes all subdomains, and
  119. # indicates a willingness to be "preloaded" into browsers:
  120. # `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
  121. # For more information visit:
  122. # - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
  123. # - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
  124. # - https://hstspreload.org/#opt-in
  125. # See: `matrix_bot_go_neb_http_header_strict_transport_security`
  126. matrix_bot_go_neb_hsts_preload_enabled: false
  127. # Database-related configuration fields.
  128. #
  129. # MUST be "sqlite3". No other type is supported.
  130. matrix_bot_go_neb_database_engine: 'sqlite3'
  131. matrix_bot_go_neb_sqlite_database_path_local: "{{ matrix_bot_go_neb_data_path }}/bot.db"
  132. matrix_bot_go_neb_sqlite_database_path_in_container: "/data/bot.db"
  133. matrix_bot_go_neb_storage_database: "{{
  134. {
  135. 'sqlite3': (matrix_bot_go_neb_sqlite_database_path_in_container + '?_busy_timeout=5000'),
  136. }[matrix_bot_go_neb_database_engine]
  137. }}"
  138. # The bot's username(s). These users need to be created manually beforehand.
  139. # The access tokens that the bot uses to authenticate.
  140. # Generate one as described in
  141. # https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-playbook-dimension.md#access-token
  142. # via curl. With the Element method, you might run into decryption problems (see https://github.com/matrix-org/go-neb#quick-start)
  143. matrix_bot_go_neb_clients: []
  144. # - UserID: "@goneb:{{ matrix_domain }}"
  145. # AccessToken: "MDASDASJDIASDJASDAFGFRGER"
  146. # DeviceID: "DEVICE1"
  147. # HomeserverURL: "{{ matrix_addons_homeserver_client_api_url }}"
  148. # Sync: true
  149. # AutoJoinRooms: true
  150. # DisplayName: "Go-NEB!"
  151. # AcceptVerificationFromUsers: [":{{ matrix_domain }}"]
  152. #
  153. # - UserID: "@another_goneb:{{ matrix_domain }}"
  154. # AccessToken: "MDASDASJDIASDJASDAFGFRGER"
  155. # DeviceID: "DEVICE2"
  156. # HomeserverURL: "{{ matrix_addons_homeserver_client_api_url }}"
  157. # Sync: false
  158. # AutoJoinRooms: false
  159. # DisplayName: "Go-NEB!"
  160. # AcceptVerificationFromUsers: ["^@admin:{{ matrix_domain }}"]
  161. # The list of realms which Go-NEB is aware of.
  162. # Delete or modify this list as appropriate.
  163. # See the docs for /configureAuthRealm for the full list of options:
  164. # https://matrix-org.github.io/go-neb/pkg/github.com/matrix-org/go-neb/api/index.html#ConfigureAuthRealmRequest
  165. matrix_bot_go_neb_realms: []
  166. # - ID: "github_realm"
  167. # Type: "github"
  168. # Config: {} # No need for client ID or Secret as Go-NEB isn't generating OAuth URLs
  169. # The list of *authenticated* sessions which Go-NEB is aware of.
  170. # Delete or modify this list as appropriate.
  171. # The full list of options are shown below: there is no single HTTP endpoint
  172. # which maps to this section.
  173. # https://matrix-org.github.io/go-neb/pkg/github.com/matrix-org/go-neb/api/index.html#Session
  174. matrix_bot_go_neb_sessions: []
  175. # - SessionID: "your_github_session"
  176. # RealmID: "github_realm"
  177. # UserID: "@alice:{{ matrix_domain }}" # This needs to be the username of the person that's allowed to use the !github commands
  178. # Config:
  179. # # Populate these fields by generating a "Personal Access Token" on github.com
  180. # AccessToken: "YOUR_GITHUB_ACCESS_TOKEN"
  181. # Scopes: "admin:org_hook,admin:repo_hook,repo,user"
  182. # The list of services which Go-NEB is aware of.
  183. # Delete or modify this list as appropriate.
  184. # See the docs for /configureService for the full list of options:
  185. # https://matrix-org.github.io/go-neb/pkg/github.com/matrix-org/go-neb/api/index.html#ConfigureServiceRequest
  186. matrix_bot_go_neb_services: []
  187. # - ID: "echo_service"
  188. # Type: "echo"
  189. # UserID: "@goneb:{{ matrix_domain }}"
  190. # Config: {}
  191. ## Can be obtained from https://developers.giphy.com/dashboard/
  192. # - ID: "giphy_service"
  193. # Type: "giphy"
  194. # UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
  195. # Config:
  196. # api_key: "qwg4672vsuyfsfe"
  197. # use_downsized: false
  198. #
  199. ## This service has been dead for over a year :/
  200. # - ID: "guggy_service"
  201. # Type: "guggy"
  202. # UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
  203. # Config:
  204. # api_key: "2356saaqfhgfe"
  205. #
  206. ## API Key via https://developers.google.com/custom-search/v1/introduction
  207. ## CX via http://www.google.com/cse/manage/all
  208. ## https://stackoverflow.com/questions/6562125/getting-a-cx-id-for-custom-search-google-api-python
  209. ## 'Search the entire web' and 'Image search' enabled for best results
  210. # - ID: "google_service"
  211. # Type: "google"
  212. # UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
  213. # Config:
  214. # api_key: "AIzaSyA4FD39m9"
  215. # cx: "AIASDFWSRRtrtr"
  216. #
  217. ## Get a key via https://api.imgur.com/oauth2/addclient
  218. ## Select "oauth2 without callback url"
  219. # - ID: "imgur_service"
  220. # Type: "imgur"
  221. # UserID: "@imgur:{{ matrix_domain }}" # requires a Syncing client
  222. # Config:
  223. # client_id: "AIzaSyA4FD39m9"
  224. # client_secret: "somesecret"
  225. #
  226. # - ID: "wikipedia_service"
  227. # Type: "wikipedia"
  228. # UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
  229. # Config:
  230. #
  231. # - ID: "rss_service"
  232. # Type: "rssbot"
  233. # UserID: "@another_goneb:{{ matrix_domain }}"
  234. # Config:
  235. # feeds:
  236. # "http://lorem-rss.herokuapp.com/feed?unit=second&interval=60":
  237. # rooms: ["!qporfwt:localhost"]
  238. # must_include:
  239. # author:
  240. # - author1
  241. # description:
  242. # - lorem
  243. # - ipsum
  244. # must_not_include:
  245. # title:
  246. # - Lorem
  247. # - Ipsum
  248. #
  249. # - ID: "github_cmd_service"
  250. # Type: "github"
  251. # UserID: "@goneb:{{ matrix_domain }}" # requires a Syncing client
  252. # Config:
  253. # RealmID: "github_realm"
  254. #
  255. # # Make sure your BASE_URL can be accessed by Github!
  256. # - ID: "github_webhook_service"
  257. # Type: "github-webhook"
  258. # UserID: "@another_goneb:{{ matrix_domain }}"
  259. # Config:
  260. # RealmID: "github_realm"
  261. # 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.
  262. # Rooms:
  263. # "!qporfwt:example.com":
  264. # Repos:
  265. # "element-hq/synapse":
  266. # Events: ["push", "issues"]
  267. # "matrix-org/dendron":
  268. # Events: ["pull_request"]
  269. # "!aaabaa:example.com":
  270. # Repos:
  271. # "element-hq/synapse":
  272. # Events: ["push", "issues"]
  273. # "matrix-org/dendron":
  274. # Events: ["pull_request"]
  275. #
  276. # - ID: "slackapi_service"
  277. # Type: "slackapi"
  278. # UserID: "@slackapi:{{ matrix_domain }}"
  279. # Config:
  280. # Hooks:
  281. # "hook1":
  282. # RoomID: "!qporfwt:example.com"
  283. # MessageType: "m.text" # default is m.text
  284. #
  285. # - ID: "alertmanager_service"
  286. # Type: "alertmanager"
  287. # UserID: "@alertmanager:{{ matrix_domain }}"
  288. # Config:
  289. # # This is for information purposes only. It should point to Go-NEB path as follows:
  290. # # `/services/hooks/<base64 encoded service ID>`
  291. # # Where in this case "service ID" is "alertmanager_service"
  292. # # Make sure your BASE_URL can be accessed by the Alertmanager instance!
  293. # webhook_url: "http://localhost/services/hooks/YWxlcnRtYW5hZ2VyX3NlcnZpY2U"
  294. # # Each room will get the notification with the alert rendered with the given template
  295. # rooms:
  296. # "!qporfwt:example.com":
  297. # text_template: "{% raw %}{{range .Alerts -}} [{{ .Status }}] {{index .Labels \"alertname\"}}: {{index .Annotations \"description\"}} {{ end -}}{% endraw %}"
  298. # 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 %}"
  299. # msg_type: "m.text" # Must be either `m.text` or `m.notice`
  300. # Default configuration template which covers the generic use case.
  301. # You can customize it by controlling the various variables inside it.
  302. #
  303. # For a more advanced customization, you can extend the default (see `matrix_bot_go_neb_configuration_extension_yaml`)
  304. # or completely replace this variable with your own template.
  305. matrix_bot_go_neb_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  306. matrix_bot_go_neb_configuration_extension_yaml: |
  307. # Your custom YAML configuration goes here.
  308. # This configuration extends the default starting configuration (`matrix_bot_go_neb_configuration_yaml`).
  309. #
  310. # You can override individual variables from the default configuration, or introduce new ones.
  311. #
  312. # If you need something more special, you can take full control by
  313. # completely redefining `matrix_bot_go_neb_configuration_yaml`.
  314. 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 {} }}"
  315. # Holds the final configuration (a combination of the default and its extension).
  316. # You most likely don't need to touch this variable. Instead, see `matrix_bot_go_neb_configuration_yaml`.
  317. matrix_bot_go_neb_configuration: "{{ matrix_bot_go_neb_configuration_yaml | from_yaml | combine(matrix_bot_go_neb_configuration_extension, recursive=True) }}"
  318. # matrix_bot_go_neb_restart_necessary controls whether the service
  319. # will be restarted (when true) or merely started (when false) by the
  320. # systemd service manager role (when conditional restart is enabled).
  321. #
  322. # This value is automatically computed during installation based on whether
  323. # any configuration files, the systemd service file, or the container image changed.
  324. # The default of `false` means "no restart needed" — appropriate when the role's
  325. # installation tasks haven't run (e.g., due to --tags skipping them).
  326. matrix_bot_go_neb_restart_necessary: false