- Add multi-instance molecule scenario verifying isolated data/config dirs - Add lifecycle molecule scenario testing stop/disable/enable/start sequence - Update default and binary verify playbooks for template unit assertions - Add integration tests for full CLI lifecycle and multi-instance support - Add pytest integration marker and --no-cov Makefile target - Update README with lifecycle commands, multi-instance examples, and architecture - Update Makefile with start/stop/enable/disable/status/remove targets - Update .env.example with GRM_LANG documentation
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
---
|
|
- name: Verify
|
|
hosts: all
|
|
become: true
|
|
pre_tasks:
|
|
- name: Load role defaults
|
|
ansible.builtin.include_vars:
|
|
dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/defaults"
|
|
tasks:
|
|
- name: Check systemd template unit exists
|
|
ansible.builtin.stat:
|
|
path: "/etc/systemd/system/gitea-runner@.service"
|
|
register: template_stat
|
|
|
|
- name: Assert template unit exists
|
|
ansible.builtin.assert:
|
|
that:
|
|
- template_stat.stat.exists
|
|
fail_msg: "Systemd template unit is missing"
|
|
|
|
- name: Check instance is enabled
|
|
ansible.builtin.systemd:
|
|
name: "gitea-runner@lifecycle-test-runner"
|
|
register: service_status
|
|
|
|
- name: Assert instance is enabled
|
|
ansible.builtin.assert:
|
|
that:
|
|
- service_status.status.LoadState == 'loaded'
|
|
fail_msg: "Systemd instance is not loaded"
|
|
|
|
- name: Check instance data directory exists after lifecycle
|
|
ansible.builtin.stat:
|
|
path: "/var/lib/gitea-runner/lifecycle-test-runner"
|
|
register: data_dir_stat
|
|
|
|
- name: Assert instance data directory exists
|
|
ansible.builtin.assert:
|
|
that:
|
|
- data_dir_stat.stat.exists
|
|
fail_msg: "Instance data directory is missing after lifecycle"
|