Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

98 líneas
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 homeserver stub prepare.yml stands up. The bridge contacts it
  31. # while starting; it is not a real homeserver and nothing is asserted
  32. # about it. There is deliberately no Discord on the other side either -
  33. # see docs/molecule-testing.md.
  34. matrix_bridge_mautrix_discord_homeserver_address: http://matrix.molecule.local:8008
  35. # sqlite keeps the scenario to one container. The role only requires a
  36. # database hostname when the engine is postgres, and testing which
  37. # database engine the bridge can talk to is not what this proves.
  38. matrix_bridge_mautrix_discord_database_engine: sqlite
  39. # Appservice tokens. These are what the bridge and homeserver would
  40. # authenticate to each other with; here they only have to reach the
  41. # rendered configuration and the registration file.
  42. matrix_bridge_mautrix_discord_appservice_token: molecule_as_token_d15c07
  43. matrix_bridge_mautrix_discord_homeserver_token: molecule_hs_token_a4e2b8
  44. # Deliberately different from the role's defaults, so verify.yml can
  45. # tell what the role rendered apart from what the bridge would have
  46. # defaulted to on its own.
  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
  51. # uses `debug`. `info` is neither.
  52. matrix_bridge_mautrix_discord_logging_level: info
  53. # Unlike most bridge roles here, mautrix-discord *requires* a public
  54. # address: `validate_config.yml` fails without
  55. # `matrix_bridge_mautrix_discord_bridge_public_address`, which is
  56. # derived from these three. Discord fetches avatars over it in relay
  57. # mode; nothing reaches it in this scenario, but it has to be set for
  58. # the role to run at all.
  59. #
  60. # A non-`/` path prefix and a non-default scheme are chosen so the
  61. # avatar-proxy labels verify.yml reads can only look the way they do if
  62. # the role composed them from these values.
  63. matrix_bridge_mautrix_discord_hostname: discord.molecule.local
  64. matrix_bridge_mautrix_discord_path_prefix: /discord-bridge
  65. matrix_bridge_mautrix_discord_scheme: http
  66. matrix_bridge_mautrix_discord_bridge_avatar_proxy_key: molecule_avatar_proxy_key_7c1d
  67. # verify.yml runs as its own play, where role defaults are out of scope,
  68. # so the paths it reads are pinned here as literals matching what the
  69. # role derives from matrix_base_data_path.
  70. matrix_bridge_mautrix_discord_base_path: /matrix/mautrix-discord
  71. matrix_bridge_mautrix_discord_config_path: /matrix/mautrix-discord/config
  72. matrix_bridge_mautrix_discord_data_path: /matrix/mautrix-discord/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