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.
 
 

181 lines
9.9 KiB

  1. ---
  2. # matrix-appservice-slack is a Matrix <-> Slack bridge
  3. # Project source code URL: https://github.com/matrix-org/matrix-appservice-slack
  4. matrix_appservice_slack_enabled: true
  5. matrix_appservice_slack_scheme: https
  6. matrix_appservice_slack_hostname: ''
  7. matrix_appservice_slack_path_prefix: /appservice-slack
  8. matrix_appservice_slack_container_image_self_build: false
  9. matrix_appservice_slack_docker_repo: "https://github.com/matrix-org/matrix-appservice-slack.git"
  10. matrix_appservice_slack_docker_repo_version: "{{ 'master' if matrix_appservice_slack_version == 'latest' else matrix_appservice_slack_version }}"
  11. matrix_appservice_slack_docker_src_files_path: "{{ matrix_base_data_path }}/appservice-slack/docker-src"
  12. # matrix_appservice_slack_version used to contain the full Docker image tag (e.g. `release-X.X.X`).
  13. # It's a bare version number now. We try to somewhat retain compatibility below.
  14. # renovate: datasource=docker depName=docker.io/matrixdotorg/matrix-appservice-slack
  15. matrix_appservice_slack_version: 2.1.2
  16. matrix_appservice_slack_docker_image: "{{ matrix_appservice_slack_docker_image_registry_prefix }}matrixdotorg/matrix-appservice-slack:{{ matrix_appservice_slack_docker_image_tag }}"
  17. matrix_appservice_slack_docker_image_registry_prefix: docker.io/
  18. matrix_appservice_slack_docker_image_tag: "{{ 'latest' if matrix_appservice_slack_version == 'latest' else ('release-' + matrix_appservice_slack_version) }}"
  19. matrix_appservice_slack_docker_image_force_pull: "{{ matrix_appservice_slack_docker_image.endswith(':latest') }}"
  20. matrix_appservice_slack_base_path: "{{ matrix_base_data_path }}/appservice-slack"
  21. matrix_appservice_slack_config_path: "{{ matrix_appservice_slack_base_path }}/config"
  22. matrix_appservice_slack_data_path: "{{ matrix_appservice_slack_base_path }}/data"
  23. matrix_appservice_slack_public_endpoint: "{{ matrix_appservice_slack_path_prefix }}"
  24. matrix_appservice_slack_inbound_uri_prefix: "{{ matrix_appservice_slack_scheme }}://{{ matrix_appservice_slack_hostname }}{{ matrix_appservice_slack_public_endpoint }}"
  25. # Once you make a control room in Matrix, you can get its ID by typing any message and checking its source
  26. matrix_appservice_slack_control_room_id: ''
  27. matrix_appservice_slack_bot_name: 'slackbot'
  28. matrix_appservice_slack_user_prefix: 'slack_'
  29. # Controls the SLACK_PORT and MATRIX_PORT of the installation
  30. matrix_appservice_slack_matrix_port: 9004
  31. matrix_appservice_slack_slack_port: 9003
  32. # Controls whether the appservice-slack container exposes its HTTP port (tcp/9003 in the container).
  33. #
  34. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9999"), or empty string to not expose.
  35. matrix_appservice_slack_container_http_host_bind_port: ''
  36. matrix_appservice_slack_container_network: ""
  37. matrix_appservice_slack_container_additional_networks: "{{ matrix_appservice_slack_container_additional_networks_auto + matrix_appservice_slack_container_additional_networks_custom }}"
  38. matrix_appservice_slack_container_additional_networks_auto: []
  39. matrix_appservice_slack_container_additional_networks_custom: []
  40. # matrix_appservice_slack_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  41. # See `../templates/labels.j2` for details.
  42. #
  43. # To inject your own other container labels, see `matrix_appservice_slack_container_labels_additional_labels`.
  44. matrix_appservice_slack_container_labels_traefik_enabled: true
  45. matrix_appservice_slack_container_labels_traefik_docker_network: "{{ matrix_appservice_slack_container_network }}"
  46. matrix_appservice_slack_container_labels_traefik_entrypoints: web-secure
  47. matrix_appservice_slack_container_labels_traefik_tls_certResolver: default # noqa var-naming
  48. # Controls whether labels will be added that expose matrix-appservice-slack's public endpoints
  49. matrix_appservice_slack_container_labels_public_endpoint_enabled: true
  50. matrix_appservice_slack_container_labels_public_endpoint_hostname: "{{ matrix_appservice_slack_hostname }}"
  51. matrix_appservice_slack_container_labels_public_endpoint_prefix: "{{ matrix_appservice_slack_path_prefix }}"
  52. matrix_appservice_slack_container_labels_public_endpoint_traefik_rule: "Host(`{{ matrix_appservice_slack_container_labels_public_endpoint_hostname }}`) && PathPrefix(`{{ matrix_appservice_slack_path_prefix }}`)"
  53. matrix_appservice_slack_container_labels_public_endpoint_traefik_priority: 0
  54. matrix_appservice_slack_container_labels_public_endpoint_traefik_entrypoints: "{{ matrix_appservice_slack_container_labels_traefik_entrypoints }}"
  55. matrix_appservice_slack_container_labels_public_endpoint_traefik_tls: "{{ matrix_appservice_slack_container_labels_public_endpoint_traefik_entrypoints != 'web' }}"
  56. matrix_appservice_slack_container_labels_public_endpoint_traefik_tls_certResolver: "{{ matrix_appservice_slack_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  57. # matrix_appservice_slack_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  58. # See `../templates/labels.j2` for details.
  59. #
  60. # Example:
  61. # matrix_appservice_slack_container_labels_additional_labels: |
  62. # my.label=1
  63. # another.label="here"
  64. matrix_appservice_slack_container_labels_additional_labels: ''
  65. # A list of extra arguments to pass to the container
  66. matrix_appservice_slack_container_extra_arguments: []
  67. # List of systemd services that matrix-appservice-slack.service depends on.
  68. matrix_appservice_slack_systemd_required_services_list: "{{ matrix_appservice_slack_systemd_required_services_list_default + matrix_appservice_slack_systemd_required_services_list_auto + matrix_appservice_slack_systemd_required_services_list_custom }}"
  69. matrix_appservice_slack_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  70. matrix_appservice_slack_systemd_required_services_list_auto: []
  71. matrix_appservice_slack_systemd_required_services_list_custom: []
  72. # List of systemd services that matrix-appservice-slack.service wants
  73. matrix_appservice_slack_systemd_wanted_services_list: []
  74. matrix_appservice_slack_homeserver_media_url: "{{ matrix_server_fqn_matrix }}"
  75. matrix_appservice_slack_homeserver_url: ""
  76. matrix_appservice_slack_homeserver_domain: "{{ matrix_domain }}"
  77. matrix_appservice_slack_appservice_url: 'http://matrix-appservice-slack'
  78. matrix_appservice_slack_appservice_token: ''
  79. matrix_appservice_slack_homeserver_token: ''
  80. matrix_appservice_slack_id_token: ''
  81. matrix_appservice_slack_database_engine: nedb
  82. matrix_appservice_slack_database_username: matrix_appservice_slack
  83. matrix_appservice_slack_database_password: 'some-passsword'
  84. matrix_appservice_slack_database_hostname: ''
  85. matrix_appservice_slack_database_port: 5432
  86. matrix_appservice_slack_database_name: matrix_appservice_slack
  87. matrix_appservice_slack_database_sslmode: disable
  88. matrix_appservice_slack_puppeting_enabled: false
  89. matrix_appservice_slack_puppeting_slackapp_client_id: ''
  90. matrix_appservice_slack_puppeting_slackapp_client_secret: ''
  91. matrix_appservice_slack_puppeting_onboard_users: true
  92. matrix_appservice_slack_team_sync_enabled: false
  93. matrix_appservice_slack_team_sync_alias_prefix: 'slack_'
  94. # The name of the container network to use when importing a NeDB database into Postgres.
  95. # For Postgres not working in a container, this can be left empty.
  96. matrix_appservice_slack_database_container_network: ''
  97. # This is just the Postgres connection string, if Postgres is used.
  98. # Naming clashes with `matrix_appservice_slack_database_connectionString` somewhat.
  99. matrix_appservice_slack_database_connection_string: 'postgresql://{{ matrix_appservice_slack_database_username }}:{{ matrix_appservice_slack_database_password }}@{{ matrix_appservice_slack_database_hostname }}:{{ matrix_appservice_slack_database_port }}/{{ matrix_appservice_slack_database_name }}?sslmode={{ matrix_appservice_slack_database_sslmode }}'
  100. # This is what actually goes into `database.connectionString` for the bridge.
  101. matrix_appservice_slack_database_connectionString: |- # noqa var-naming
  102. {{
  103. {
  104. 'nedb': 'nedb:///data',
  105. 'postgres': matrix_appservice_slack_database_connection_string,
  106. }[matrix_appservice_slack_database_engine]
  107. }}
  108. matrix_appservice_slack_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  109. matrix_appservice_slack_configuration_extension_yaml: |
  110. #slack_hook_port: 9898
  111. #inbound_uri_prefix: "https://my.server.here:9898/"
  112. #bot_username: "slackbot"
  113. #username_prefix: "slack_"
  114. # Optional
  115. #slack_master_token: "abc-123-def"
  116. # Optional
  117. #matrix_admin_room: "!qporfwt:example.com"
  118. #homeserver:
  119. # url: http://localhost:{{ matrix_synapse_container_client_api_port }}
  120. # server_name: my.server
  121. # Optional
  122. #tls:
  123. # key_file: /path/to/tls.key
  124. # crt_file: /path/to/tls.crt
  125. #logging:
  126. # console: "info"
  127. # files:
  128. # - "./debug.log": "info"
  129. # - "./error.log": "error"
  130. matrix_appservice_slack_configuration_extension: "{{ matrix_appservice_slack_configuration_extension_yaml | from_yaml if matrix_appservice_slack_configuration_extension_yaml | from_yaml else {} }}"
  131. matrix_appservice_slack_configuration: "{{ matrix_appservice_slack_configuration_yaml | from_yaml | combine(matrix_appservice_slack_configuration_extension, recursive=True) }}"
  132. matrix_appservice_slack_registration_yaml: |
  133. id: "{{ matrix_appservice_slack_id_token }}"
  134. as_token: "{{ matrix_appservice_slack_appservice_token }}"
  135. hs_token: "{{ matrix_appservice_slack_homeserver_token }}"
  136. namespaces:
  137. users:
  138. - exclusive: true
  139. regex: '@{{ matrix_appservice_slack_user_prefix }}.*'
  140. aliases:
  141. - exclusive: false
  142. regex: '#{{ matrix_appservice_slack_user_prefix }}.*'
  143. rooms: []
  144. url: "{{ matrix_appservice_slack_appservice_url }}:{{ matrix_appservice_slack_matrix_port }}"
  145. sender_localpart: slackbot
  146. rate_limited: true
  147. protocols: null
  148. matrix_appservice_slack_registration: "{{ matrix_appservice_slack_registration_yaml | from_yaml }}"