Test matrix-element-admin with Molecule

This commit is contained in:
Slavi Pantaleev
2026-08-30 19:40:41 +03:00
parent b8145c2806
commit 2347d99b86
6 changed files with 478 additions and 0 deletions
@@ -0,0 +1,38 @@
# SPDX-FileCopyrightText: 2026 Slavi Pantaleev
#
# SPDX-License-Identifier: AGPL-3.0-or-later
---
- name: Include roles for matrix-element-admin Molecule tests
hosts: all
become: true
vars_files:
- "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/../../../molecule-shared/playbook-context.yml"
gather_facts: true
tasks:
- name: Include roles for matrix-element-admin Molecule tests
ansible.builtin.include_role:
name: "{{ role_name }}"
public: true
loop:
- com.devture.ansible.role.playbook_help
- com.devture.ansible.role.systemd_docker_base
- "custom/{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
loop_control:
loop_var: role_name
# The component role installs the unit; the full playbook's systemd service manager
# starts it. Keep the role-scoped scenario at the same boundary and start it directly.
- name: Ensure matrix-element-admin is started
hosts: all
become: true
gather_facts: false
tasks:
- name: Ensure systemd daemon is reloaded
ansible.builtin.systemd_service:
daemon_reload: true
- name: Ensure the matrix-element-admin systemd service is started
ansible.builtin.systemd_service:
name: matrix-element-admin.service
state: started