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.
 
 

110 lines
5.5 KiB

  1. # matrix-appservice-discord is a Matrix <-> Discord bridge
  2. # See: https://github.com/Half-Shot/matrix-appservice-discord
  3. matrix_appservice_discord_enabled: true
  4. matrix_appservice_discord_docker_image: "docker.io/halfshot/matrix-appservice-discord:v1.0.0"
  5. matrix_appservice_discord_docker_image_force_pull: "{{ matrix_appservice_discord_docker_image.endswith(':latest') }}"
  6. matrix_appservice_discord_base_path: "{{ matrix_base_data_path }}/appservice-discord"
  7. matrix_appservice_discord_config_path: "{{ matrix_base_data_path }}/appservice-discord/config"
  8. matrix_appservice_discord_data_path: "{{ matrix_base_data_path }}/appservice-discord/data"
  9. # Get your own keys at https://discordapp.com/developers/applications/me/create
  10. matrix_appservice_discord_client_id: ''
  11. matrix_appservice_discord_bot_token: ''
  12. matrix_appservice_discord_appservice_token: ''
  13. matrix_appservice_discord_homeserver_token: ''
  14. matrix_appservice_discord_homeserver_domain: "{{ matrix_domain }}"
  15. # Controls whether the matrix-appservice-discord container exposes its HTTP port (tcp/9005 in the container).
  16. #
  17. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9005"), or empty string to not expose.
  18. matrix_appservice_discord_container_http_host_bind_port: ''
  19. # A list of extra arguments to pass to the container
  20. matrix_appservice_discord_container_extra_arguments: []
  21. # List of systemd services that matrix-appservice-discord.service depends on.
  22. matrix_appservice_discord_systemd_required_services_list: ['docker.service']
  23. # List of systemd services that matrix-appservice-discord.service wants
  24. matrix_appservice_discord_systemd_wanted_services_list: []
  25. matrix_appservice_discord_appservice_url: 'http://matrix-appservice-discord:9005'
  26. matrix_appservice_discord_bridge_domain: "{{ matrix_domain }}"
  27. # As of right now, the homeserver URL must be a public URL. See below.
  28. matrix_appservice_discord_bridge_homeserverUrl: "{{ matrix_homeserver_url }}"
  29. matrix_appservice_discord_bridge_disablePresence: false
  30. matrix_appservice_discord_bridge_enableSelfServiceBridging: false
  31. # Database-related configuration fields.
  32. #
  33. # To use SQLite, stick to these defaults.
  34. #
  35. # To use Postgres:
  36. # - change the engine (`matrix_appservice_discord_database_engine: 'postgres'`)
  37. # - adjust your database credentials via the `matrix_appservice_discord_postgres_*` variables
  38. matrix_appservice_discord_database_engine: 'sqlite'
  39. matrix_appservice_discord_sqlite_database_path_local: "{{ matrix_appservice_discord_data_path }}/discord.db"
  40. matrix_appservice_discord_sqlite_database_path_in_container: "/data/discord.db"
  41. matrix_appservice_discord_database_username: 'matrix_appservice_discord'
  42. matrix_appservice_discord_database_password: 'some-password'
  43. matrix_appservice_discord_database_hostname: 'matrix-postgres'
  44. matrix_appservice_discord_database_port: 5432
  45. matrix_appservice_discord_database_name: 'matrix_appservice_discord'
  46. # These 2 variables are what actually ends up in the bridge configuration.
  47. # It's best if you don't change them directly, but rather redefine the sub-variables that constitute them.
  48. matrix_appservice_discord_database_filename: "{{ matrix_appservice_discord_sqlite_database_path_in_container }}"
  49. matrix_appservice_discord_database_connString: 'postgresql://{{ matrix_appservice_discord_database_username }}:{{ matrix_appservice_discord_database_password }}@{{ matrix_appservice_discord_database_hostname }}:{{ matrix_appservice_discord_database_port }}/{{ matrix_appservice_discord_database_name }}'
  50. # Tells whether the bot should make use of "Privileged Gateway Intents".
  51. #
  52. # Enabling this means that you need to enable it for the bot (Discord application) as well,
  53. # by triggering all Intent checkboxes on a page like this: `https://discord.com/developers/applications/694448564151123988/bot`
  54. #
  55. # Learn more: https://gist.github.com/advaith1/e69bcc1cdd6d0087322734451f15aa2f
  56. matrix_appservice_discord_auth_usePrivilegedIntents: false
  57. matrix_appservice_discord_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  58. matrix_appservice_discord_configuration_extension_yaml: |
  59. # Your custom YAML configuration goes here.
  60. # This configuration extends the default starting configuration (`matrix_appservice_discord_configuration_yaml`).
  61. #
  62. # You can override individual variables from the default configuration, or introduce new ones.
  63. #
  64. # If you need something more special, you can take full control by
  65. # completely redefining `matrix_appservice_discord_configuration_yaml`.
  66. matrix_appservice_discord_configuration_extension: "{{ matrix_appservice_discord_configuration_extension_yaml|from_yaml if matrix_appservice_discord_configuration_extension_yaml|from_yaml is mapping else {} }}"
  67. matrix_appservice_discord_configuration: "{{ matrix_appservice_discord_configuration_yaml|from_yaml|combine(matrix_appservice_discord_configuration_extension, recursive=True) }}"
  68. matrix_appservice_discord_registration_yaml: |
  69. #jinja2: lstrip_blocks: "True"
  70. id: appservice-discord
  71. as_token: "{{ matrix_appservice_discord_appservice_token }}"
  72. hs_token: "{{ matrix_appservice_discord_homeserver_token }}"
  73. namespaces:
  74. users:
  75. - exclusive: true
  76. regex: '@_discord_.*:{{ matrix_appservice_discord_homeserver_domain|regex_escape }}'
  77. aliases:
  78. - exclusive: true
  79. regex: '#_discord_.*:{{ matrix_appservice_discord_homeserver_domain|regex_escape }}'
  80. url: {{ matrix_appservice_discord_appservice_url }}
  81. sender_localpart: _discord_bot
  82. rate_limited: false
  83. protocols:
  84. - discord
  85. matrix_appservice_discord_registration: "{{ matrix_appservice_discord_registration_yaml|from_yaml }}"