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.
 
 

350 lines
18 KiB

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