Matrix Docker Ansible eploy
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

107 рядки
4.6 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. # The role's default for this references
  68. # `matrix_bridge_beeper_linkedin_homeserver_domain` /
  69. # `..._homeserver_address`, which belong to a *different* role. In a
  70. # playbook run every role's defaults are in scope, so it renders; a role
  71. # scenario has only this role loaded and the template fails on the
  72. # undefined name. Neutralised here rather than worked around in the
  73. # role, and reported as a defect of the role.
  74. matrix_bridge_mautrix_discord_bridge_double_puppet_server_map_default: {}
  75. # verify.yml runs as its own play, where role defaults are out of scope,
  76. # so the paths it reads are pinned here as literals matching what the
  77. # role derives from matrix_base_data_path.
  78. matrix_bridge_mautrix_discord_base_path: /matrix/mautrix-discord
  79. matrix_bridge_mautrix_discord_config_path: /matrix/mautrix-discord/config
  80. matrix_bridge_mautrix_discord_data_path: /matrix/mautrix-discord/data
  81. env:
  82. # Workaround for https://github.com/ansible/molecule/issues/4391
  83. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  84. scenario:
  85. test_sequence:
  86. - dependency
  87. - cleanup
  88. - destroy
  89. - syntax
  90. - create
  91. - prepare
  92. - converge
  93. - idempotence
  94. - verify
  95. - cleanup
  96. - destroy
  97. verifier:
  98. name: ansible