Matrix Docker Ansible eploy
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

94 satır
4.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: mautrix-discord-${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_discord_container_network: mautrix-discord-molecule
  30. # The stub prepare.yml stands up. Not a real homeserver, and nothing is asserted
  31. # about it. There is deliberately no Discord on the other side either.
  32. matrix_bridge_mautrix_discord_homeserver_address: http://matrix.molecule.local:8008
  33. # Postgres, because that is what `group_vars/matrix_servers` selects whenever postgres
  34. # is enabled - which is the default, so it is what essentially every real deployment
  35. # runs. prepare.yml stands one up. Name and user differ from the role's defaults, so
  36. # reaching the database proves the role built its connection string out of these.
  37. matrix_bridge_mautrix_discord_database_engine: postgres
  38. matrix_bridge_mautrix_discord_database_hostname: matrix-postgres-molecule
  39. matrix_bridge_mautrix_discord_database_name: molecule_discord
  40. matrix_bridge_mautrix_discord_database_username: molecule_discord
  41. matrix_bridge_mautrix_discord_database_password: molecule_pg_password_a17f34
  42. # Here these only have to reach the rendered configuration and the registration.
  43. matrix_bridge_mautrix_discord_appservice_token: molecule_as_token_d15c07
  44. matrix_bridge_mautrix_discord_homeserver_token: molecule_hs_token_a4e2b8
  45. # Different from the role's defaults, so verify.yml can tell what the role rendered
  46. # apart from what the bridge would have chosen.
  47. matrix_bridge_mautrix_discord_appservice_bot_username: molecule-discordbot
  48. matrix_bridge_mautrix_discord_homeserver_domain: molecule.local
  49. matrix_bridge_mautrix_discord_bridge_command_prefix: "!molecule-discord"
  50. # The role defaults to `warn`, the bridge's own shipped configuration to `debug`.
  51. # `info` is neither.
  52. matrix_bridge_mautrix_discord_logging_level: info
  53. # Unlike most bridge roles here, mautrix-discord *requires* a public address:
  54. # `validate_config.yml` fails without one, and it is derived from these three.
  55. # Discord fetches avatars over it in relay mode. Nothing reaches it in this scenario,
  56. # but it has to be set for the role to run at all.
  57. #
  58. # A non-`/` path prefix and a non-default scheme are chosen so the avatar-proxy labels
  59. # verify.yml reads can only look the way they do if the role composed them.
  60. matrix_bridge_mautrix_discord_hostname: discord.molecule.local
  61. matrix_bridge_mautrix_discord_path_prefix: /discord-bridge
  62. matrix_bridge_mautrix_discord_scheme: http
  63. matrix_bridge_mautrix_discord_bridge_avatar_proxy_key: molecule_avatar_proxy_key_7c1d
  64. # verify.yml runs as its own play, where the role's defaults are out of scope,
  65. # so the paths it reads are pinned here to match what the role derives.
  66. matrix_bridge_mautrix_discord_base_path: /matrix/mautrix-discord
  67. matrix_bridge_mautrix_discord_config_path: /matrix/mautrix-discord/config
  68. matrix_bridge_mautrix_discord_data_path: /matrix/mautrix-discord/data
  69. env:
  70. # Workaround for https://github.com/ansible/molecule/issues/4391
  71. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  72. scenario:
  73. test_sequence:
  74. - dependency
  75. - cleanup
  76. - destroy
  77. - syntax
  78. - create
  79. - prepare
  80. - converge
  81. - idempotence
  82. - verify
  83. - cleanup
  84. - destroy
  85. verifier:
  86. name: ansible