Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

85 řádky
3.5 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-whatsapp-${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_whatsapp_container_network: mautrix-whatsapp-molecule
  30. # The stub prepare.yml stands up. Not a real homeserver, and nothing is asserted
  31. # about it.
  32. matrix_bridge_mautrix_whatsapp_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. The password differs from the role's default, so
  36. # reaching the database at all means the role's connection string was built from these.
  37. # Database name and user differ from the role's defaults, so the bridge reaching the
  38. # database at all proves the role built its connection string out of these rather
  39. # than out of anything it would have picked on its own. prepare.yml creates them.
  40. matrix_bridge_mautrix_whatsapp_database_engine: postgres
  41. matrix_bridge_mautrix_whatsapp_database_hostname: matrix-postgres-molecule
  42. matrix_bridge_mautrix_whatsapp_database_name: molecule_whatsapp
  43. matrix_bridge_mautrix_whatsapp_database_username: molecule_whatsapp
  44. matrix_bridge_mautrix_whatsapp_database_password: molecule_pg_password_5e8c21
  45. # Here these only have to reach the rendered configuration and the registration.
  46. matrix_bridge_mautrix_whatsapp_appservice_token: molecule_as_token_4f2a91
  47. matrix_bridge_mautrix_whatsapp_homeserver_token: molecule_hs_token_9b3e77
  48. # Different from the role's defaults, so verify.yml can tell what the role rendered
  49. # apart from what the bridge would have chosen.
  50. matrix_bridge_mautrix_whatsapp_appservice_bot_username: molecule-whatsappbot
  51. matrix_bridge_mautrix_whatsapp_homeserver_domain: molecule.local
  52. # Traefik is not deployed here, so the labels the role would render for it are
  53. # switched off and their absence is asserted instead.
  54. matrix_bridge_mautrix_whatsapp_container_labels_traefik_enabled: false
  55. # verify.yml runs as its own play, where the role's defaults are out of scope,
  56. # so the paths it reads are pinned here to match what the role derives.
  57. matrix_bridge_mautrix_whatsapp_base_path: /matrix/mautrix-whatsapp
  58. matrix_bridge_mautrix_whatsapp_config_path: /matrix/mautrix-whatsapp/config
  59. matrix_bridge_mautrix_whatsapp_data_path: /matrix/mautrix-whatsapp/data
  60. env:
  61. # Workaround for https://github.com/ansible/molecule/issues/4391
  62. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  63. scenario:
  64. test_sequence:
  65. - dependency
  66. - cleanup
  67. - destroy
  68. - syntax
  69. - create
  70. - prepare
  71. - converge
  72. - idempotence
  73. - verify
  74. - cleanup
  75. - destroy
  76. verifier:
  77. name: ansible