mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-08-29 20:13:13 +00:00
94 lines
4.1 KiB
YAML
94 lines
4.1 KiB
YAML
# SPDX-FileCopyrightText: 2026 Slavi Pantaleev
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
---
|
|
dependency:
|
|
name: galaxy
|
|
options:
|
|
requirements-file: requirements.yml
|
|
force: true
|
|
driver:
|
|
name: docker
|
|
platforms:
|
|
- name: mautrix-telegram-${MOLECULE_DISTRO:-ubuntu2604}-default
|
|
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2604}-ansible:latest"
|
|
command: ${MOLECULE_DOCKER_COMMAND:-""}
|
|
volumes:
|
|
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
|
cgroupns_mode: host
|
|
privileged: true
|
|
pre_build_image: true
|
|
provisioner:
|
|
name: ansible
|
|
config_options:
|
|
defaults:
|
|
callback_result_format: yaml
|
|
inventory:
|
|
group_vars:
|
|
all:
|
|
matrix_bridge_mautrix_telegram_container_network: mautrix-telegram-molecule
|
|
|
|
# The stub prepare.yml stands up. It is not a real homeserver and the scenario
|
|
# does not attempt to bridge a Telegram account.
|
|
matrix_bridge_mautrix_telegram_homeserver_address: http://matrix.molecule.local:8008
|
|
matrix_bridge_mautrix_telegram_homeserver_domain: molecule.local
|
|
|
|
# Postgres is what group_vars/matrix_servers selects in the normal deployment.
|
|
# Name and user differ from the role defaults, so a migrated schema proves the
|
|
# bridge used the connection string the role composed from these values.
|
|
matrix_bridge_mautrix_telegram_database_engine: postgres
|
|
matrix_bridge_mautrix_telegram_database_hostname: matrix-postgres-molecule
|
|
matrix_bridge_mautrix_telegram_database_name: molecule_telegram
|
|
matrix_bridge_mautrix_telegram_database_username: molecule_telegram
|
|
matrix_bridge_mautrix_telegram_database_password: molecule_pg_password_a492c8
|
|
|
|
# Plausibly shaped placeholders only. Starting the bridge does not contact Telegram;
|
|
# that happens after a user explicitly starts a login through the provisioning API.
|
|
matrix_bridge_mautrix_telegram_api_id: 12345678
|
|
matrix_bridge_mautrix_telegram_api_hash: "0123456789abcdef0123456789abcdef"
|
|
|
|
# These only have to reach the rendered configuration and registration.
|
|
matrix_bridge_mautrix_telegram_appservice_token: molecule_telegram_as_token_2405cd
|
|
matrix_bridge_mautrix_telegram_homeserver_token: molecule_telegram_hs_token_bdf713
|
|
|
|
# Each differs from the role and bridge defaults so parsed-config assertions can
|
|
# distinguish the role carrying a value through from an upstream default.
|
|
matrix_bridge_mautrix_telegram_appservice_bot_username: molecule-telegrambot
|
|
matrix_bridge_mautrix_telegram_command_prefix: "!molecule-tg"
|
|
matrix_bridge_mautrix_telegram_network_displayname_template: '{% raw %}{{ .Username }} (Molecule){% endraw %}'
|
|
matrix_bridge_mautrix_telegram_federate_rooms: false
|
|
matrix_bridge_mautrix_telegram_bridge_personal_filtering_spaces: false
|
|
matrix_bridge_mautrix_telegram_backfill_enabled: false
|
|
matrix_bridge_mautrix_telegram_logging_level: debug
|
|
|
|
# Traefik is not deployed. The scenario checks the public address the bridge reads
|
|
# and the labels the role renders from these settings.
|
|
matrix_bridge_mautrix_telegram_exposure_enabled: true
|
|
matrix_bridge_mautrix_telegram_exposure_hostname: bridges.molecule.local
|
|
matrix_bridge_mautrix_telegram_exposure_path_prefix: /bridges/telegram
|
|
matrix_bridge_mautrix_telegram_scheme: https
|
|
|
|
# verify.yml is a separate play, so pin the paths that it must read there.
|
|
matrix_bridge_mautrix_telegram_base_path: /matrix/mautrix-telegram
|
|
matrix_bridge_mautrix_telegram_config_path: /matrix/mautrix-telegram/config
|
|
matrix_bridge_mautrix_telegram_data_path: /matrix/mautrix-telegram/data
|
|
env:
|
|
# Workaround for https://github.com/ansible/molecule/issues/4391
|
|
ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/../..:/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${ANSIBLE_HOME:-~/.ansible}/roles
|
|
scenario:
|
|
test_sequence:
|
|
- dependency
|
|
- cleanup
|
|
- destroy
|
|
- syntax
|
|
- create
|
|
- prepare
|
|
- converge
|
|
- idempotence
|
|
- verify
|
|
- cleanup
|
|
- destroy
|
|
verifier:
|
|
name: ansible
|