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

99 行
4.7 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: mautrix-meta-messenger-${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_mautrix_meta_messenger_container_network: mautrix-meta-messenger-molecule
  30. # The stub prepare.yml stands up. Not a real homeserver, and nothing is asserted
  31. # about it.
  32. matrix_bridge_mautrix_meta_messenger_homeserver_address: http://matrix.molecule.local:8008
  33. matrix_bridge_mautrix_meta_messenger_homeserver_domain: molecule.local
  34. # Postgres, because that is what `group_vars/matrix_servers` selects whenever postgres
  35. # is enabled - which is the default, so it is what essentially every real deployment
  36. # runs. prepare.yml stands one up. Name and user differ from the role's defaults, so
  37. # reaching the database proves the role built its connection string out of these.
  38. matrix_bridge_mautrix_meta_messenger_database_engine: postgres
  39. matrix_bridge_mautrix_meta_messenger_database_hostname: matrix-postgres-molecule
  40. matrix_bridge_mautrix_meta_messenger_database_name: molecule_meta_messenger
  41. matrix_bridge_mautrix_meta_messenger_database_username: molecule_meta_messenger
  42. matrix_bridge_mautrix_meta_messenger_database_password: molecule_pg_password_d24e70
  43. # Here these only have to reach the rendered configuration and the registration.
  44. matrix_bridge_mautrix_meta_messenger_appservice_token: molecule_meta_as_token_5c81de
  45. matrix_bridge_mautrix_meta_messenger_homeserver_token: molecule_meta_hs_token_a70f24
  46. # What makes this role family unusual: one upstream codebase serves several Meta
  47. # networks, and this variable picks which. It reaches the rendered configuration in
  48. # four places at once - appservice id, ghost username prefix, bot displayname and the
  49. # bridge's `tor` switch - so a value other than the role's default is what tells
  50. # verify.yml the role propagated the choice rather than everything agreeing by accident.
  51. #
  52. # `facebook-tor` is used because it is the only mode that also flips a boolean.
  53. # Nothing logs in during the scenario, so the bridge never connects to Meta.
  54. matrix_bridge_mautrix_meta_messenger_meta_mode: facebook-tor
  55. # Different from the role's defaults and from what the bridge would pick on its own,
  56. # so verify.yml can tell what the role rendered apart from a coincidence.
  57. matrix_bridge_mautrix_meta_messenger_appservice_username: molecule-metabot
  58. matrix_bridge_mautrix_meta_messenger_bridge_command_prefix: "!molecule-meta"
  59. matrix_bridge_mautrix_meta_messenger_bridge_displayname_suffix: "(Molecule)"
  60. matrix_bridge_mautrix_meta_messenger_logging_min_level: debug
  61. # Traefik is not deployed here, so nothing routes to it. What is tested is that the
  62. # role turns these three variables into both the container's Traefik labels and the
  63. # `appservice.public_address` the bridge itself reads.
  64. matrix_bridge_mautrix_meta_messenger_exposure_enabled: true
  65. matrix_bridge_mautrix_meta_messenger_exposure_hostname: bridges.molecule.local
  66. matrix_bridge_mautrix_meta_messenger_exposure_path_prefix: /bridges/meta-messenger
  67. matrix_bridge_mautrix_meta_messenger_scheme: https
  68. # verify.yml runs as its own play, where the role's defaults are out of scope,
  69. # so the paths it reads are pinned here to match what the role derives.
  70. matrix_bridge_mautrix_meta_messenger_base_path: /matrix/mautrix-meta-messenger
  71. matrix_bridge_mautrix_meta_messenger_config_path: /matrix/mautrix-meta-messenger/config
  72. matrix_bridge_mautrix_meta_messenger_data_path: /matrix/mautrix-meta-messenger/data
  73. env:
  74. # Workaround for https://github.com/ansible/molecule/issues/4391
  75. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  76. scenario:
  77. test_sequence:
  78. - dependency
  79. - cleanup
  80. - destroy
  81. - syntax
  82. - create
  83. - prepare
  84. - converge
  85. - idempotence
  86. - verify
  87. - cleanup
  88. - destroy
  89. verifier:
  90. name: ansible