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.
 
 
 

111 lines
4.6 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-draupnir-${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_draupnir_container_network: matrix-bot-draupnir-molecule
  30. # verify.yml is a separate play where the role's defaults are out of scope. Pin
  31. # only paths it reads; the component version is loaded from defaults/main.yml.
  32. matrix_bot_draupnir_base_path: /matrix/draupnir
  33. matrix_bot_draupnir_config_path: /matrix/draupnir/config
  34. matrix_bot_draupnir_data_path: /matrix/draupnir/data
  35. # Full-playbook context supplies the companion role's switch. It is deliberately
  36. # absent here: this scenario tests the standalone bot, not the appservice variant.
  37. matrix_appservice_draupnir_for_all_enabled: false
  38. # A local homeserver stub accepts this fake token. No real Matrix or third-party
  39. # account is involved. The pre-existing room avoids zero-touch room creation.
  40. matrix_bot_draupnir_config_accessToken: molecule_draupnir_access_token_48c1e7
  41. matrix_bot_draupnir_config_homeserverUrl: http://matrix.molecule.local:8008
  42. matrix_bot_draupnir_config_rawHomeserverUrl: http://matrix.molecule.local:8008
  43. matrix_bot_draupnir_config_managementRoom: "!draupnir-control:molecule.local"
  44. matrix_bot_draupnir_zero_touch_deploy: false
  45. matrix_bot_draupnir_pantalaimon_use: false
  46. matrix_bot_draupnir_login_native: false
  47. matrix_bot_draupnir_config_experimentalRustCrypto: false
  48. # Values differ from both role and upstream defaults. The extension also disables
  49. # recovery safe mode: otherwise Draupnir can become healthy after a recoverable
  50. # bootstrap failure without entering its normal moderation mode.
  51. matrix_bot_draupnir_config_disableServerACL: true
  52. matrix_bot_draupnir_config_roomStateBackingStore_enabled: false
  53. matrix_bot_draupnir_config_web_abuseReporting: true
  54. matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled: false
  55. matrix_bot_draupnir_config_web_port: 18082
  56. matrix_bot_draupnir_config_displayReports: false
  57. matrix_bot_draupnir_configuration_extension_yaml: |
  58. logLevel: DEBUG
  59. verifyPermissionsOnStartup: false
  60. noop: true
  61. backgroundDelayMS: 137
  62. commands:
  63. allowNoPrefix: true
  64. safeMode:
  65. bootOption: Never
  66. health:
  67. healthz:
  68. enabled: true
  69. port: 18081
  70. address: 0.0.0.0
  71. endpoint: /molecule-ready
  72. healthyStatus: 201
  73. unhealthyStatus: 503
  74. # Traefik itself is not deployed. The role still renders these labels and Docker
  75. # consumes them, proving the public-report routing contract and the derived network.
  76. matrix_bot_draupnir_container_labels_traefik_enabled: true
  77. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_hostname: draupnir-reports.molecule.local
  78. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_path_regexp: ^/molecule-report/(v1)/rooms/([^/]*)/event/(.*)$$
  79. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_priority: 743
  80. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_entrypoints: web
  81. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_tls: false
  82. matrix_bot_draupnir_container_labels_traefik_labels_additional_labels: |
  83. molecule.draupnir.coverage=enabled
  84. # Match the production-like no-host-port path; probes join the Docker network.
  85. matrix_bot_draupnir_container_http_host_bind_port: ''
  86. env:
  87. # Workaround for https://github.com/ansible/molecule/issues/4391
  88. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  89. scenario:
  90. test_sequence:
  91. - dependency
  92. - cleanup
  93. - destroy
  94. - syntax
  95. - create
  96. - prepare
  97. - converge
  98. - idempotence
  99. - verify
  100. - cleanup
  101. - destroy
  102. verifier:
  103. name: ansible