Matrix Docker Ansible eploy
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

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