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

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