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.
 
 
 

123 lines
5.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-honoroit-${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. # setup.yml normally carries this play-wide switch.
  30. run_setup: true
  31. matrix_bot_honoroit_hostname: honoroit.molecule.local
  32. matrix_bot_honoroit_path_prefix: /molecule-honoroit
  33. matrix_bot_honoroit_metrics_path: /molecule-metrics
  34. matrix_bot_honoroit_container_port: 18080
  35. matrix_bot_honoroit_container_network: matrix-bot-honoroit-molecule
  36. matrix_bot_honoroit_container_additional_networks:
  37. - matrix-bot-honoroit-molecule-additional
  38. # verify.yml is a separate play, where the role's defaults are out of scope.
  39. matrix_bot_honoroit_base_path: /matrix/honoroit
  40. matrix_bot_honoroit_config_path: /matrix/honoroit/config
  41. matrix_bot_honoroit_data_path: /matrix/honoroit/data
  42. # Traefik itself is not deployed, but the full metrics routing contract is rendered
  43. # with non-default values and compared with the live container labels.
  44. matrix_bot_honoroit_container_labels_traefik_enabled: true
  45. matrix_bot_honoroit_container_labels_traefik_docker_network: "{{ matrix_bot_honoroit_container_network }}"
  46. matrix_bot_honoroit_container_labels_traefik_priority: 710
  47. matrix_bot_honoroit_container_labels_traefik_entrypoints: molecule-web
  48. matrix_bot_honoroit_container_labels_traefik_tls: false
  49. matrix_bot_honoroit_container_labels_traefik_additional_response_headers_custom:
  50. X-Molecule-Honoroit: scenario
  51. X-Robots-Tag: noindex
  52. matrix_bot_honoroit_container_labels_additional_labels: |
  53. molecule.honoroit.scenario=live-postgres-and-metrics
  54. # Real deployments use Postgres whenever the playbook's Postgres is enabled. All
  55. # identifiers differ from the role defaults, so a migrated schema proves the role
  56. # constructed and passed the configured DSN.
  57. matrix_bot_honoroit_database_engine: postgres
  58. matrix_bot_honoroit_database_hostname: matrix-postgres-molecule
  59. matrix_bot_honoroit_database_username: molecule_honoroit_user
  60. matrix_bot_honoroit_database_password: molecule_honoroit_password_8c45d1
  61. matrix_bot_honoroit_database_name: molecule_honoroit_database
  62. matrix_bot_honoroit_database_sslmode: disable
  63. # These differ from both role and upstream defaults. The shared homeserver stub is
  64. # sufficient for password login, crypto initialization and an idle sync loop.
  65. matrix_bot_honoroit_login: molecule-honoroit
  66. matrix_bot_honoroit_password: molecule_matrix_password_74aa5e
  67. matrix_bot_honoroit_homeserver: http://matrix.molecule.local:8008
  68. matrix_bot_honoroit_roomid: "!molecule-operators:molecule.local"
  69. matrix_bot_honoroit_prefix: "!molecule-help"
  70. matrix_bot_honoroit_loglevel: DEBUG
  71. matrix_bot_honoroit_cachesize: 317
  72. matrix_bot_honoroit_no_encryption_warning: true
  73. matrix_bot_honoroit_ignorenothread: true
  74. matrix_bot_honoroit_ignoredrooms:
  75. - "!molecule-ignored-one:molecule.local"
  76. - "!molecule-ignored-two:molecule.local"
  77. matrix_bot_honoroit_allowedusers:
  78. - "@support-*:molecule.local"
  79. - "@operator:molecule.local"
  80. matrix_bot_honoroit_text_prefix_open: "[MOLECULE OPEN]"
  81. matrix_bot_honoroit_text_prefix_done: "[MOLECULE DONE]"
  82. matrix_bot_honoroit_text_greetings: Molecule helpdesk greeting
  83. matrix_bot_honoroit_text_done: Molecule helpdesk completion
  84. # Live metrics authentication forms the primary compatibility gate: correct
  85. # credentials must work and both absent and wrong credentials must not.
  86. matrix_bot_honoroit_auth_metrics_login: molecule-metrics-user
  87. matrix_bot_honoroit_auth_metrics_password: molecule_metrics_password_c9ed32
  88. # Keep the generic environment extension observable independently of the role's
  89. # first-class port wiring.
  90. matrix_bot_honoroit_environment_variables_extension: |
  91. MOLECULE_HONOROIT_MARKER=role-rendered-environment
  92. # Exercise arbitrary runtime arguments and a second private network without making
  93. # anything reachable from the Molecule host.
  94. matrix_bot_honoroit_container_extra_arguments:
  95. - --pids-limit=73
  96. - --tmpfs=/tmp:rw,noexec,nosuid,size=16m
  97. env:
  98. # Workaround for https://github.com/ansible/molecule/issues/4391
  99. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  100. scenario:
  101. test_sequence:
  102. - dependency
  103. - cleanup
  104. - destroy
  105. - syntax
  106. - create
  107. - prepare
  108. - converge
  109. - idempotence
  110. - verify
  111. - cleanup
  112. - destroy
  113. verifier:
  114. name: ansible