Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

82 lines
3.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-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 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.
  33. matrix_bridge_mautrix_whatsapp_homeserver_address: http://matrix.molecule.local:8008
  34. # sqlite keeps the scenario to one container. The role only requires a
  35. # database hostname when the engine is postgres, and testing which
  36. # database engine the bridge can talk to is not what this proves.
  37. matrix_bridge_mautrix_whatsapp_database_engine: sqlite
  38. # Appservice tokens. These are what the bridge and homeserver would
  39. # authenticate to each other with; here they only have to reach the
  40. # rendered configuration and the registration file.
  41. matrix_bridge_mautrix_whatsapp_appservice_token: molecule_as_token_4f2a91
  42. matrix_bridge_mautrix_whatsapp_homeserver_token: molecule_hs_token_9b3e77
  43. # Deliberately different from the role's defaults, so verify.yml can
  44. # tell what the role rendered apart from what the bridge would have
  45. # defaulted to on its own.
  46. matrix_bridge_mautrix_whatsapp_appservice_bot_username: molecule-whatsappbot
  47. matrix_bridge_mautrix_whatsapp_homeserver_domain: molecule.local
  48. # Traefik is not deployed here, so the labels the role would render for
  49. # it are switched off and their absence is asserted instead.
  50. matrix_bridge_mautrix_whatsapp_container_labels_traefik_enabled: false
  51. # verify.yml runs as its own play, where role defaults are out of scope,
  52. # so the paths it reads are pinned here as literals matching what the
  53. # role derives from matrix_base_data_path.
  54. matrix_bridge_mautrix_whatsapp_base_path: /matrix/mautrix-whatsapp
  55. matrix_bridge_mautrix_whatsapp_config_path: /matrix/mautrix-whatsapp/config
  56. matrix_bridge_mautrix_whatsapp_data_path: /matrix/mautrix-whatsapp/data
  57. env:
  58. # Workaround for https://github.com/ansible/molecule/issues/4391
  59. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  60. scenario:
  61. test_sequence:
  62. - dependency
  63. - cleanup
  64. - destroy
  65. - syntax
  66. - create
  67. - prepare
  68. - converge
  69. - idempotence
  70. - verify
  71. - cleanup
  72. - destroy
  73. verifier:
  74. name: ansible