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.
 
 

187 lines
8.0 KiB

  1. # Mx Puppet Slack is a Matrix <-> Slack bridge
  2. # See: https://github.com/Sorunome/mx-puppet-slack
  3. matrix_mx_puppet_slack_enabled: true
  4. matrix_mx_puppet_slack_container_image_self_build: false
  5. # Controls whether the mx-puppet-slack container exposes its HTTP port (tcp/8432 in the container).
  6. #
  7. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8432"), or empty string to not expose.
  8. matrix_mx_puppet_slack_container_http_host_bind_port: ''
  9. matrix_mx_puppet_slack_docker_image: "sorunome/mx-puppet-slack:latest"
  10. matrix_mx_puppet_slack_docker_image_force_pull: "{{ matrix_mx_puppet_slack_docker_image.endswith(':latest') }}"
  11. matrix_mx_puppet_slack_base_path: "{{ matrix_base_data_path }}/mx-puppet-slack"
  12. matrix_mx_puppet_slack_config_path: "{{ matrix_mx_puppet_slack_base_path }}/config"
  13. matrix_mx_puppet_slack_data_path: "{{ matrix_mx_puppet_slack_base_path }}/data"
  14. matrix_mx_puppet_slack_docker_src_files_path: "{{ matrix_mx_puppet_slack_base_path }}/docker-src"
  15. matrix_mx_puppet_slack_appservice_port: "8432"
  16. matrix_mx_puppet_slack_homeserver_address: 'http://matrix-synapse:8008'
  17. matrix_mx_puppet_slack_homeserver_domain: '{{ matrix_domain }}'
  18. matrix_mx_puppet_slack_appservice_address: 'http://matrix-mx-puppet-slack:{{ matrix_mx_puppet_slack_appservice_port }}'
  19. matrix_mx_puppet_slack_client_id: ''
  20. matrix_mx_puppet_slack_client_secret: ''
  21. matrix_mx_puppet_slack_redirect_path: '/slack/oauth'
  22. matrix_mx_puppet_slack_redirect_uri: 'https://{{ matrix_server_fqn_matrix }}{{ matrix_mx_puppet_slack_redirect_path }}'
  23. # "@user:server.com" to allow specific user
  24. # "@.*:yourserver.com" to allow users on a specific homeserver
  25. # "@.*" to allow anyone
  26. matrix_mx_puppet_slack_provisioning_whitelist:
  27. - "@.*:{{ matrix_domain|regex_escape }}"
  28. # Leave empty to disable blacklist
  29. # "@user:server.com" disallow a specific user
  30. # "@.*:yourserver.com" disallow users on a specific homeserver
  31. matrix_mx_puppet_slack_provisioning_blacklist: []
  32. # A list of extra arguments to pass to the container
  33. matrix_mx_puppet_slack_container_extra_arguments: []
  34. # List of systemd services that matrix-puppet-slack.service depends on.
  35. matrix_mx_puppet_slack_systemd_required_services_list: ['docker.service']
  36. # List of systemd services that matrix-puppet-slack.service wants
  37. matrix_mx_puppet_slack_systemd_wanted_services_list: []
  38. matrix_mx_puppet_slack_appservice_token: ''
  39. matrix_mx_puppet_slack_homeserver_token: ''
  40. # Default configuration template which covers the generic use case.
  41. # You can customize it by controlling the various variables inside it.
  42. #
  43. # For a more advanced customization, you can extend the default (see `matrix_mx_puppet_slack_configuration_extension_yaml`)
  44. # or completely replace this variable with your own template.
  45. matrix_mx_puppet_slack_configuration_yaml: |
  46. #jinja2: lstrip_blocks: "True"
  47. bridge:
  48. # Port to host the bridge on
  49. # Used for communication between the homeserver and the bridge
  50. port: {{ matrix_mx_puppet_slack_appservice_port }}
  51. # The host connections to the bridge's webserver are allowed from
  52. bindAddress: 0.0.0.0
  53. # Public domain of the homeserver
  54. domain: {{ matrix_mx_puppet_slack_homeserver_domain }}
  55. # Reachable URL of the Matrix homeserver
  56. homeserverUrl: {{ matrix_mx_puppet_slack_homeserver_address }}
  57. # Slack OAuth settings. Create a slack app at https://api.slack.com/apps
  58. oauth:
  59. enabled: true
  60. # Slack app credentials.
  61. # N.B. This must be quoted so YAML wouldn't parse it as a float.
  62. clientId: "{{ matrix_mx_puppet_slack_client_id }}"
  63. clientSecret: {{ matrix_mx_puppet_slack_client_secret }}
  64. # Path where to listen for OAuth redirect callbacks.
  65. redirectPath: {{ matrix_mx_puppet_slack_redirect_path }}
  66. # Set up proxying from https://your.domain/redirect_path to http://bindAddress:port/redirect_path,
  67. # then set this field and the Slack app redirect URI field to the former.
  68. redirectUri: {{ matrix_mx_puppet_slack_redirect_uri }}
  69. presence:
  70. # Bridge Discord online/offline status
  71. enabled: true
  72. # How often to send status to the homeserver in milliseconds
  73. interval: 500
  74. provisioning:
  75. # Regex of Matrix IDs allowed to use the puppet bridge
  76. whitelist: {{ matrix_mx_puppet_slack_provisioning_whitelist|to_json }}
  77. # Allow a specific user
  78. #- "@user:server\\.com"
  79. # Allow users on a specific homeserver
  80. #- "@.*:yourserver\\.com"
  81. # Allow anyone
  82. #- ".*"
  83. # Regex of Matrix IDs forbidden from using the puppet bridge
  84. #blacklist:
  85. # Disallow a specific user
  86. #- "@user:server\\.com"
  87. # Disallow users on a specific homeserver
  88. #- "@.*:yourserver\\.com"
  89. blacklist: {{ matrix_mx_puppet_slack_provisioning_blacklist|to_json }}
  90. # Shared secret for the provisioning API for use by integration managers.
  91. # If this is not set, the provisioning API will not be enabled.
  92. #sharedSecret: random string
  93. # Path prefix for the provisioning API. /v1 will be appended to the prefix automatically.
  94. apiPrefix: /_matrix/provision
  95. database:
  96. # Use Postgres as a database backend
  97. # If set, will be used instead of SQLite3
  98. # Connection string to connect to the Postgres instance
  99. # with username "user", password "pass", host "localhost" and database name "dbname".
  100. # Modify each value as necessary
  101. #connString: "postgres://user:pass@localhost/dbname?sslmode=disable"
  102. # Use SQLite3 as a database backend
  103. # The name of the database file
  104. filename: /data/database.db
  105. logging:
  106. # Log level of console output
  107. # Allowed values starting with most verbose:
  108. # silly, debug, verbose, info, warn, error
  109. console: info
  110. # Date and time formatting
  111. lineDateFormat: MMM-D HH:mm:ss.SSS
  112. # Logging files
  113. # Log files are rotated daily by default
  114. files:
  115. # Log file path
  116. - file: "/data/bridge.log"
  117. # Log level for this file
  118. # Allowed values starting with most verbose:
  119. # silly, debug, verbose, info, warn, error
  120. level: info
  121. # Date and time formatting
  122. datePattern: YYYY-MM-DD
  123. # Maximum number of logs to keep.
  124. # This can be a number of files or number of days.
  125. # If using days, add 'd' as a suffix
  126. maxFiles: 14d
  127. # Maximum size of the file after which it will rotate. This can be a
  128. # number of bytes, or units of kb, mb, and gb. If using the units, add
  129. # 'k', 'm', or 'g' as the suffix
  130. maxSize: 50m
  131. matrix_mx_puppet_slack_configuration_extension_yaml: |
  132. # Your custom YAML configuration goes here.
  133. # This configuration extends the default starting configuration (`matrix_mx_puppet_slack_configuration_yaml`).
  134. #
  135. # You can override individual variables from the default configuration, or introduce new ones.
  136. #
  137. # If you need something more special, you can take full control by
  138. # completely redefining `matrix_mx_puppet_slack_configuration_yaml`.
  139. matrix_mx_puppet_slack_configuration_extension: "{{ matrix_mx_puppet_slack_configuration_extension_yaml|from_yaml if matrix_mx_puppet_slack_configuration_extension_yaml|from_yaml is mapping else {} }}"
  140. # Holds the final configuration (a combination of the default and its extension).
  141. # You most likely don't need to touch this variable. Instead, see `matrix_mx_puppet_slack_configuration_yaml`.
  142. matrix_mx_puppet_slack_configuration: "{{ matrix_mx_puppet_slack_configuration_yaml|from_yaml|combine(matrix_mx_puppet_slack_configuration_extension, recursive=True) }}"
  143. matrix_mx_puppet_slack_registration_yaml: |
  144. as_token: "{{ matrix_mx_puppet_slack_appservice_token }}"
  145. hs_token: "{{ matrix_mx_puppet_slack_homeserver_token }}"
  146. id: slack-puppet
  147. namespaces:
  148. users:
  149. - exclusive: true
  150. regex: '@_slackpuppet_.*:{{ matrix_mx_puppet_slack_homeserver_domain|regex_escape }}'
  151. rooms: []
  152. aliases:
  153. - exclusive: true
  154. regex: '#_slackpuppet_.*:{{ matrix_mx_puppet_slack_homeserver_domain|regex_escape }}'
  155. protocols: []
  156. rate_limited: false
  157. sender_localpart: _slackpuppet_bot
  158. url: {{ matrix_mx_puppet_slack_appservice_address }}
  159. matrix_mx_puppet_slack_registration: "{{ matrix_mx_puppet_slack_registration_yaml|from_yaml }}"