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.
 
 
 

101 lines
4.3 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: matrix-bot-maubot-${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_bot_maubot_container_network: matrix-bot-maubot-molecule
  30. # verify.yml runs as a separate play, where role defaults are out of scope. Pin
  31. # paths it reads to the values the role derives during converge.
  32. matrix_bot_maubot_base_path: /matrix/maubot
  33. matrix_bot_maubot_config_path: /matrix/maubot/config
  34. matrix_bot_maubot_data_path: /matrix/maubot/data
  35. # Postgres is the normal playbook path. The non-default database and user mean
  36. # successful migrations prove that the role assembled and Maubot consumed this URI.
  37. matrix_bot_maubot_database_engine: postgres
  38. matrix_bot_maubot_database_hostname: matrix-postgres-molecule
  39. matrix_bot_maubot_database_name: molecule_maubot
  40. matrix_bot_maubot_database_username: molecule_maubot
  41. matrix_bot_maubot_database_password: molecule_pg_password_27c541
  42. matrix_bot_maubot_database_sslmode: disable
  43. # Both the port and public path differ from the role and Maubot defaults. The scenario
  44. # proves the internal endpoints and the public-prefix/StripPrefix mapping separately.
  45. matrix_bot_maubot_server_port: 29427
  46. matrix_bot_maubot_scheme: https
  47. matrix_bot_maubot_hostname: maubot.molecule.local
  48. matrix_bot_maubot_path_prefix: /molecule-maubot
  49. matrix_bot_maubot_unshared_secret: molecule_unshared_secret_b9317a
  50. # The homeserver is only recorded as a convenient management-interface preset.
  51. # Maubot has no clients or instances yet, so it does not contact this deliberately
  52. # nonexistent service during startup and no external Matrix credentials are needed.
  53. matrix_bot_maubot_homeserver_name: molecule-homeserver
  54. matrix_bot_maubot_homeserver_url: https://matrix-no-such-service.invalid
  55. matrix_bot_maubot_homeserver_secret: molecule_registration_secret_98e127
  56. matrix_bot_maubot_initial_password: molecule_matrix_password_unused_62aa11
  57. # This account belongs only to Maubot's management API. Logging in below proves the
  58. # running process loaded it, rather than merely proving that a YAML file exists.
  59. matrix_bot_maubot_admins:
  60. molecule-admin: molecule_admin_password_61bd93
  61. matrix_bot_maubot_logging_level: DEBUG
  62. # No Traefik is deployed. Non-default values still let the scenario verify the role's
  63. # public-routing contract in both the label file and Docker's accepted labels.
  64. matrix_bot_maubot_container_labels_traefik_enabled: true
  65. matrix_bot_maubot_container_labels_traefik_docker_network: matrix-bot-maubot-molecule
  66. matrix_bot_maubot_container_labels_management_enabled: true
  67. matrix_bot_maubot_container_labels_management_hostname: maubot.molecule.local
  68. matrix_bot_maubot_container_labels_management_traefik_priority: 719
  69. matrix_bot_maubot_container_labels_management_traefik_entrypoints: web
  70. matrix_bot_maubot_container_labels_management_traefik_tls: false
  71. matrix_bot_maubot_container_labels_additional_labels: |
  72. molecule.maubot.coverage=enabled
  73. # Keep the production-like no-host-port path: probes join the container network.
  74. matrix_bot_maubot_container_management_interface_http_bind_port: ''
  75. env:
  76. # Workaround for https://github.com/ansible/molecule/issues/4391
  77. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  78. scenario:
  79. test_sequence:
  80. - dependency
  81. - cleanup
  82. - destroy
  83. - syntax
  84. - create
  85. - prepare
  86. - converge
  87. - idempotence
  88. - verify
  89. - cleanup
  90. - destroy
  91. verifier:
  92. name: ansible