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

103 строки
4.2 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: hookshot-${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_bridge_hookshot_container_network: hookshot-molecule
  30. # The stub prepare.yml stands up. Not a real homeserver, and nothing is asserted
  31. # about it.
  32. matrix_bridge_hookshot_homeserver_address: http://matrix.molecule.local:8008
  33. # Here these only have to reach the rendered configuration and the registration.
  34. matrix_bridge_hookshot_appservice_token: molecule_as_token_4f2a91
  35. matrix_bridge_hookshot_homeserver_token: molecule_hs_token_9b3e77
  36. # Different from the role's default, so the registration's sender_localpart can only
  37. # have come from the role. prepare.yml tells the stub to claim this same user id.
  38. matrix_bridge_hookshot_bot_localpart: molecule-hookshot
  39. # Hookshot's HTTP surface is the point of this scenario. Every port below differs
  40. # from BOTH the role's default and Hookshot's own, so an answer can only mean the
  41. # role's configuration reached the process. verify.yml also asserts nothing answers
  42. # on the defaults these replace.
  43. matrix_bridge_hookshot_appservice_port: 9772
  44. matrix_bridge_hookshot_webhook_port: 9741
  45. # Off in the role's defaults. Enabling it renders a second entry in the `listeners`
  46. # list, and /metrics is the cheapest listener to assert *content* on.
  47. matrix_bridge_hookshot_metrics_enabled: true
  48. matrix_bridge_hookshot_metrics_port: 9752
  49. # On in the role's defaults. Off here so the absence of a listener can be asserted:
  50. # the widgets port staying closed is what tells "the role rendered the listener list"
  51. # apart from "Hookshot binds everything anyway".
  52. matrix_bridge_hookshot_widgets_enabled: false
  53. # No third-party service is configured here; see the header of verify.yml.
  54. # GitLab is the one the role enables by default, so it is explicitly switched off.
  55. matrix_bridge_hookshot_gitlab_enabled: false
  56. # The generic webhooks listener needs no account anywhere, so it is what this
  57. # scenario exercises live. The prefix differs from the role's default.
  58. matrix_bridge_hookshot_generic_userIdPrefix: _molecule_hook_ # noqa var-naming
  59. # Neither the role's default (600) nor Hookshot's own (600).
  60. matrix_bridge_hookshot_feeds_pollIntervalSeconds: 907 # noqa var-naming
  61. # The role defaults to `warn`, Hookshot itself to `info`. A third value, so finding
  62. # it in config.yml cannot be a coincidence.
  63. matrix_bridge_hookshot_logging_level: debug
  64. # Traefik is not deployed here, so the labels the role would render for it are
  65. # switched off and their absence is asserted instead.
  66. matrix_bridge_hookshot_container_labels_traefik_enabled: false
  67. # verify.yml runs as its own play, where role defaults are out of scope, so what it
  68. # reads is pinned here. These two match the role's own defaults on purpose: they name
  69. # things rather than configure them, and nothing is asserted *about* them.
  70. matrix_bridge_hookshot_base_path: /matrix/hookshot
  71. matrix_bridge_hookshot_identifier: matrix-hookshot
  72. env:
  73. # Workaround for https://github.com/ansible/molecule/issues/4391
  74. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  75. scenario:
  76. test_sequence:
  77. - dependency
  78. - cleanup
  79. - destroy
  80. - syntax
  81. - create
  82. - prepare
  83. - converge
  84. - idempotence
  85. - verify
  86. - cleanup
  87. - destroy
  88. verifier:
  89. name: ansible