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.
 
 
 

94 lines
4.1 KiB

  1. # SPDX-FileCopyrightText: 2026 Slavi Pantaleev
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. dependency:
  6. name: galaxy
  7. options:
  8. requirements-file: requirements.yml
  9. force: true
  10. driver:
  11. name: docker
  12. platforms:
  13. - name: mautrix-telegram-${MOLECULE_DISTRO:-ubuntu2604}-default
  14. image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2604}-ansible:latest"
  15. command: ${MOLECULE_DOCKER_COMMAND:-""}
  16. volumes:
  17. - /sys/fs/cgroup:/sys/fs/cgroup:rw
  18. cgroupns_mode: host
  19. privileged: true
  20. pre_build_image: true
  21. provisioner:
  22. name: ansible
  23. config_options:
  24. defaults:
  25. callback_result_format: yaml
  26. inventory:
  27. group_vars:
  28. all:
  29. matrix_bridge_mautrix_telegram_container_network: mautrix-telegram-molecule
  30. # The stub prepare.yml stands up. It is not a real homeserver and the scenario
  31. # does not attempt to bridge a Telegram account.
  32. matrix_bridge_mautrix_telegram_homeserver_address: http://matrix.molecule.local:8008
  33. matrix_bridge_mautrix_telegram_homeserver_domain: molecule.local
  34. # Postgres is what group_vars/matrix_servers selects in the normal deployment.
  35. # Name and user differ from the role defaults, so a migrated schema proves the
  36. # bridge used the connection string the role composed from these values.
  37. matrix_bridge_mautrix_telegram_database_engine: postgres
  38. matrix_bridge_mautrix_telegram_database_hostname: matrix-postgres-molecule
  39. matrix_bridge_mautrix_telegram_database_name: molecule_telegram
  40. matrix_bridge_mautrix_telegram_database_username: molecule_telegram
  41. matrix_bridge_mautrix_telegram_database_password: molecule_pg_password_a492c8
  42. # Plausibly shaped placeholders only. Starting the bridge does not contact Telegram;
  43. # that happens after a user explicitly starts a login through the provisioning API.
  44. matrix_bridge_mautrix_telegram_api_id: 12345678
  45. matrix_bridge_mautrix_telegram_api_hash: "0123456789abcdef0123456789abcdef"
  46. # These only have to reach the rendered configuration and registration.
  47. matrix_bridge_mautrix_telegram_appservice_token: molecule_telegram_as_token_2405cd
  48. matrix_bridge_mautrix_telegram_homeserver_token: molecule_telegram_hs_token_bdf713
  49. # Each differs from the role and bridge defaults so parsed-config assertions can
  50. # distinguish the role carrying a value through from an upstream default.
  51. matrix_bridge_mautrix_telegram_appservice_bot_username: molecule-telegrambot
  52. matrix_bridge_mautrix_telegram_command_prefix: "!molecule-tg"
  53. matrix_bridge_mautrix_telegram_network_displayname_template: '{% raw %}{{ .Username }} (Molecule){% endraw %}'
  54. matrix_bridge_mautrix_telegram_federate_rooms: false
  55. matrix_bridge_mautrix_telegram_bridge_personal_filtering_spaces: false
  56. matrix_bridge_mautrix_telegram_backfill_enabled: false
  57. matrix_bridge_mautrix_telegram_logging_level: debug
  58. # Traefik is not deployed. The scenario checks the public address the bridge reads
  59. # and the labels the role renders from these settings.
  60. matrix_bridge_mautrix_telegram_exposure_enabled: true
  61. matrix_bridge_mautrix_telegram_exposure_hostname: bridges.molecule.local
  62. matrix_bridge_mautrix_telegram_exposure_path_prefix: /bridges/telegram
  63. matrix_bridge_mautrix_telegram_scheme: https
  64. # verify.yml is a separate play, so pin the paths that it must read there.
  65. matrix_bridge_mautrix_telegram_base_path: /matrix/mautrix-telegram
  66. matrix_bridge_mautrix_telegram_config_path: /matrix/mautrix-telegram/config
  67. matrix_bridge_mautrix_telegram_data_path: /matrix/mautrix-telegram/data
  68. env:
  69. # Workaround for https://github.com/ansible/molecule/issues/4391
  70. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  71. scenario:
  72. test_sequence:
  73. - dependency
  74. - cleanup
  75. - destroy
  76. - syntax
  77. - create
  78. - prepare
  79. - converge
  80. - idempotence
  81. - verify
  82. - cleanup
  83. - destroy
  84. verifier:
  85. name: ansible