mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-09-22 07:40:09 +00:00
Test matrix-static-files with Molecule
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# SPDX-FileCopyrightText: 2026 Slavi Pantaleev
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
---
|
||||
- name: Include roles for matrix-static-files Molecule tests
|
||||
hosts: all
|
||||
become: true
|
||||
vars_files:
|
||||
- "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/../../../molecule-shared/playbook-context.yml"
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- name: Include base roles for matrix-static-files 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
|
||||
loop_control:
|
||||
loop_var: role_name
|
||||
|
||||
# main.yml also invokes the separately-tagged public self-check. In the full
|
||||
# playbook that runs only after systemd_service_manager has started services.
|
||||
- name: Include matrix-static-files setup task files
|
||||
ansible.builtin.include_role:
|
||||
name: "custom/{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
|
||||
public: true
|
||||
tasks_from: "{{ role_task_file }}"
|
||||
loop:
|
||||
- validate_config.yml
|
||||
- install.yml
|
||||
loop_control:
|
||||
loop_var: role_task_file
|
||||
|
||||
- name: Ensure matrix-static-files 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 matrix-static-files systemd service is started
|
||||
ansible.builtin.systemd_service:
|
||||
name: matrix-static-files.service
|
||||
state: started
|
||||
Reference in New Issue
Block a user