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.
 
 
 

99 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 into the
  31. # homeserver as an ordinary user with a password. The stub prepare.yml
  32. # stands up answers /_matrix/client/v3/login with an access token, which
  33. # is all the bot needs to get past its login and into its sync loop.
  34. matrix_bot_matrix_reminder_bot_matrix_homeserver_url: http://matrix.molecule.local:8008
  35. # Deliberately different from the role's default localpart
  36. # (`bot.matrix-reminder-bot`), so verify.yml can tell what the role
  37. # rendered apart from what it would have rendered anyway.
  38. matrix_bot_matrix_reminder_bot_matrix_user_id_localpart: molecule.reminder-bot
  39. matrix_bot_matrix_reminder_bot_matrix_user_password: molecule_bot_password_4f2a91
  40. # The role has no default here and refuses to run without one. Also
  41. # different from the bot's own fallback (`Etc/UTC`), and it reaches the
  42. # container twice - through the config file and through TZ on the unit.
  43. matrix_bot_matrix_reminder_bot_reminders_timezone: Europe/Sofia
  44. # The role and the bot both default to `!`.
  45. matrix_bot_matrix_reminder_bot_command_prefix: "%%"
  46. # Both lists default to off with no entries, so turning them on with
  47. # entries of our own exercises the `_auto + _custom` composition.
  48. matrix_bot_matrix_reminder_bot_allowlist_enabled: true
  49. matrix_bot_matrix_reminder_bot_allowlist_regexes_custom:
  50. - "@molecule-allowed:molecule.local"
  51. matrix_bot_matrix_reminder_bot_blocklist_enabled: true
  52. matrix_bot_matrix_reminder_bot_blocklist_regexes_custom:
  53. - ".*:blocked.molecule.local"
  54. # The device name is hardcoded in the role's config template, so
  55. # overriding it is only possible through the extension mechanism. Doing
  56. # it here means the merge of template + extension is tested too.
  57. matrix_bot_matrix_reminder_bot_configuration_extension_yaml: |
  58. matrix:
  59. device_name: Molecule Reminder Bot
  60. # The SQLite database path is moved off the role's default (`bot.db`) so
  61. # that verify.yml can assert the bot opened the path the role gave it,
  62. # with the default name as a negative control.
  63. matrix_bot_matrix_reminder_bot_sqlite_database_path_local: /matrix/matrix-reminder-bot/data/molecule-reminders.db
  64. matrix_bot_matrix_reminder_bot_sqlite_database_path_in_container: /data/molecule-reminders.db
  65. # verify.yml runs as its own play, where the role's defaults are out of
  66. # scope, so the paths it reads are pinned here as literals. They match
  67. # what the role derives from `matrix_base_data_path`.
  68. matrix_bot_matrix_reminder_bot_base_path: /matrix/matrix-reminder-bot
  69. matrix_bot_matrix_reminder_bot_config_path: /matrix/matrix-reminder-bot/config
  70. matrix_bot_matrix_reminder_bot_data_path: /matrix/matrix-reminder-bot/data
  71. matrix_bot_matrix_reminder_bot_data_store_path: /matrix/matrix-reminder-bot/data/store
  72. env:
  73. # Workaround for https://github.com/ansible/molecule/issues/4391
  74. ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
  75. scenario:
  76. test_sequence:
  77. - dependency
  78. - cleanup
  79. - destroy
  80. - syntax
  81. - create
  82. - prepare
  83. - converge
  84. - idempotence
  85. - verify
  86. - cleanup
  87. - destroy
  88. verifier:
  89. name: ansible