Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

78 строки
3.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: matrix-alertmanager-receiver-${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_alertmanager_receiver_hostname: alertmanager-receiver.molecule.local
  30. matrix_alertmanager_receiver_path_prefix: /
  31. matrix_alertmanager_receiver_container_network: matrix-alertmanager-receiver-molecule
  32. # verify.yml runs as its own play, where the role's defaults are out
  33. # of scope, so the paths it reads are pinned here as literals. They
  34. # match what the role derives from matrix_base_data_path above.
  35. matrix_alertmanager_receiver_base_path: /matrix/alertmanager-receiver
  36. matrix_alertmanager_receiver_config_path: /matrix/alertmanager-receiver/config
  37. # Traefik is not deployed in this scenario, so the labels the role would
  38. # render for it are switched off and their absence is asserted instead.
  39. matrix_alertmanager_receiver_container_labels_traefik_enabled: false
  40. # Deliberately different from the role's own defaults (port 12345,
  41. # metrics disabled, alerts under /alerts), so that `verify.yml` can tell
  42. # what the role rendered apart from what the application would have done
  43. # on its own.
  44. matrix_alertmanager_receiver_config_http_port: 12399
  45. matrix_alertmanager_receiver_config_http_metrics_enabled: true
  46. matrix_alertmanager_receiver_config_http_metrics_path: /molecule-metrics
  47. matrix_alertmanager_receiver_config_http_alerts_path_prefix: /molecule-alerts
  48. # The homeserver IS reached at startup - the service fetches its joined
  49. # rooms and exits 1 if that fails - so prepare.yml stands up a stub for it
  50. matrix_alertmanager_receiver_config_matrix_homeserver_url: http://matrix.molecule.local:8008
  51. matrix_alertmanager_receiver_config_matrix_user_id: "@alertmanager:molecule.local"
  52. matrix_alertmanager_receiver_config_matrix_access_token: molecule_access_token_4f2a91
  53. matrix_alertmanager_receiver_config_matrix_room_mapping:
  54. molecule-room: "!molecule-room-id:molecule.local"
  55. env:
  56. # Workaround for https://github.com/ansible/molecule/issues/4391
  57. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  58. scenario:
  59. test_sequence:
  60. - dependency
  61. - cleanup
  62. - destroy
  63. - syntax
  64. - create
  65. - prepare
  66. - converge
  67. - idempotence
  68. - verify
  69. - cleanup
  70. - destroy
  71. verifier:
  72. name: ansible