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.
 
 
 

115 lines
4.8 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: synapse-${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. # This first scenario deliberately exercises one main Synapse process. Workers and
  30. # everything they bring with them belong in a separate topology-focused scenario.
  31. matrix_synapse_workers_enabled: false
  32. matrix_synapse_redis_enabled: false
  33. matrix_synapse_reverse_proxy_companion_enabled: false
  34. matrix_synapse_username: matrix
  35. matrix_synapse_uid: 1234
  36. matrix_synapse_gid: 1234
  37. matrix_synapse_container_network: synapse-molecule
  38. # The non-default listener is reached only over the container network. Override the
  39. # upstream image's health command as well, because its default assumes port 8008.
  40. matrix_synapse_container_client_api_port: 18008
  41. matrix_synapse_container_client_api_host_bind_port: ''
  42. matrix_synapse_container_master_extra_arguments:
  43. - "--health-cmd='curl -fSs http://localhost:18008/health'"
  44. matrix_synapse_container_labels_traefik_enabled: false
  45. matrix_synapse_container_labels_traefik_hostname: matrix.molecule.local
  46. matrix_synapse_systemd_service_post_start_delay_seconds: 0
  47. # Postgres is the normal deployment path. Distinct database and user names make the
  48. # resulting Synapse schema evidence that these exact connection settings were used.
  49. matrix_synapse_database_host: matrix-postgres-molecule
  50. matrix_synapse_database_port: 5432
  51. matrix_synapse_database_user: molecule_synapse
  52. matrix_synapse_database_password: molecule_synapse_pg_password_9b742d
  53. matrix_synapse_database_database: molecule_synapse
  54. matrix_synapse_database_cp_min: 2
  55. matrix_synapse_database_cp_max: 4
  56. # Local scenario secrets only. They never authenticate to an external service.
  57. matrix_synapse_macaroon_secret_key: molecule_synapse_macaroon_4b3f891d
  58. matrix_synapse_registration_shared_secret: molecule_synapse_registration_27ed51a8
  59. matrix_synapse_form_secret: molecule_synapse_form_96a04c7b
  60. matrix_synapse_password_config_pepper: molecule_synapse_pepper_c0f371e6
  61. # These values differ from both role and upstream defaults and are safe to exercise
  62. # without introducing any external dependency.
  63. matrix_synapse_public_baseurl: http://matrix.molecule.local:18008/
  64. matrix_synapse_presence_enabled: false
  65. matrix_synapse_max_upload_size_mb: 37
  66. matrix_synapse_url_preview_enabled: false
  67. matrix_synapse_allow_public_rooms_over_federation: false
  68. matrix_synapse_user_directory_search_all_users: true
  69. matrix_synapse_user_directory_prefer_local_users: true
  70. matrix_synapse_trusted_key_servers: []
  71. matrix_synapse_suppress_key_server_warning: true
  72. # Keep the scenario fully local and intentionally exclude optional integrations.
  73. matrix_synapse_federation_enabled: false
  74. matrix_synapse_federation_port_openid_resource_required: false
  75. matrix_synapse_tls_federation_listener_enabled: false
  76. matrix_synapse_metrics_enabled: false
  77. matrix_synapse_email_enabled: false
  78. matrix_synapse_matrix_authentication_service_enabled: false
  79. matrix_authentication_service_migration_in_progress: false
  80. matrix_synapse_ext_synapse_s3_storage_provider_enabled: false
  81. matrix_s3_media_store_enabled: false
  82. matrix_playbook_ssl_enabled: false
  83. # verify.yml is a separate play, so pin paths that otherwise come from role defaults.
  84. # The component version is deliberately loaded from defaults/main.yml instead.
  85. matrix_synapse_base_path: /matrix/synapse
  86. matrix_synapse_config_dir_path: /matrix/synapse/config
  87. matrix_synapse_storage_path: /matrix/synapse/storage
  88. matrix_synapse_media_store_path: /matrix/synapse/storage/media-store
  89. env:
  90. # Workaround for https://github.com/ansible/molecule/issues/4391
  91. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  92. scenario:
  93. test_sequence:
  94. - dependency
  95. - cleanup
  96. - destroy
  97. - syntax
  98. - create
  99. - prepare
  100. - converge
  101. - idempotence
  102. - verify
  103. - cleanup
  104. - destroy
  105. verifier:
  106. name: ansible