Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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