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.2 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: matrix-reminder-bot-${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_bot_matrix_reminder_bot_container_network: matrix-reminder-bot-molecule
  30. # Unlike the bridges, this bot is not an appservice: it logs in as an ordinary user
  31. # with a password. The stub answers /_matrix/client/v3/login with an access token,
  32. # which is all the bot needs to reach its sync loop.
  33. matrix_bot_matrix_reminder_bot_matrix_homeserver_url: http://matrix.molecule.local:8008
  34. # Different from the role's default localpart, so verify.yml can tell what the role
  35. # rendered apart from what it would have rendered anyway.
  36. matrix_bot_matrix_reminder_bot_matrix_user_id_localpart: molecule.reminder-bot
  37. matrix_bot_matrix_reminder_bot_matrix_user_password: molecule_bot_password_4f2a91
  38. # The role has no default here and refuses to run without one. Also different from the
  39. # bot's own fallback, and it reaches the container twice: the config file and TZ.
  40. matrix_bot_matrix_reminder_bot_reminders_timezone: Europe/Sofia
  41. # The role and the bot both default to `!`.
  42. matrix_bot_matrix_reminder_bot_command_prefix: "%%"
  43. # Both lists default to off with no entries, so turning them on exercises the
  44. # `_auto + _custom` composition.
  45. matrix_bot_matrix_reminder_bot_allowlist_enabled: true
  46. matrix_bot_matrix_reminder_bot_allowlist_regexes_custom:
  47. - "@molecule-allowed:molecule.local"
  48. matrix_bot_matrix_reminder_bot_blocklist_enabled: true
  49. matrix_bot_matrix_reminder_bot_blocklist_regexes_custom:
  50. - ".*:blocked.molecule.local"
  51. # The device name is hardcoded in the role's template, so overriding it is only
  52. # possible through the extension mechanism - which tests that merge too.
  53. matrix_bot_matrix_reminder_bot_configuration_extension_yaml: |
  54. matrix:
  55. device_name: Molecule Reminder Bot
  56. # Postgres, because that is what `group_vars/matrix_servers` selects whenever postgres
  57. # is enabled - which is the default, so it is what essentially every real deployment
  58. # runs. prepare.yml stands one up. Name and user differ from the role's defaults, so
  59. # reaching the database proves the role built its connection string out of these.
  60. matrix_bot_matrix_reminder_bot_database_engine: postgres
  61. matrix_bot_matrix_reminder_bot_database_hostname: matrix-postgres-molecule
  62. matrix_bot_matrix_reminder_bot_database_name: molecule_reminder_bot
  63. matrix_bot_matrix_reminder_bot_database_username: molecule_reminder_bot
  64. matrix_bot_matrix_reminder_bot_database_password: molecule_pg_password_3c9b02
  65. # verify.yml runs as its own play, where the role's defaults are out of scope,
  66. # so the paths it reads are pinned here to match what the role derives.
  67. matrix_bot_matrix_reminder_bot_base_path: /matrix/matrix-reminder-bot
  68. matrix_bot_matrix_reminder_bot_config_path: /matrix/matrix-reminder-bot/config
  69. matrix_bot_matrix_reminder_bot_data_path: /matrix/matrix-reminder-bot/data
  70. matrix_bot_matrix_reminder_bot_data_store_path: /matrix/matrix-reminder-bot/data/store
  71. env:
  72. # Workaround for https://github.com/ansible/molecule/issues/4391
  73. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  74. scenario:
  75. test_sequence:
  76. - dependency
  77. - cleanup
  78. - destroy
  79. - syntax
  80. - create
  81. - prepare
  82. - converge
  83. - idempotence
  84. - verify
  85. - cleanup
  86. - destroy
  87. verifier:
  88. name: ansible