Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

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