- Add runner_name variable to default, binary, and lifecycle verify playbooks - Update molecule target to test all 7 scenarios sequentially - Add molecule-docker and molecule-binary platform matrix targets - Disable checkmake maxbodylength rule to accommodate longer recipes
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
---
|
|
- name: Verify
|
|
hosts: all
|
|
become: true
|
|
vars:
|
|
runner_name: "lifecycle-test-runner"
|
|
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: "{{ gitea_runner_base_data_dir }}/{{ runner_name }}"
|
|
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"
|