44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
---
|
|
- name: Verify
|
|
hosts: all
|
|
become: true
|
|
vars:
|
|
gitea_runner_name: "update-test-runner"
|
|
pre_tasks:
|
|
- name: Load role defaults
|
|
ansible.builtin.include_vars:
|
|
dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/defaults"
|
|
tasks:
|
|
- name: Check runner binary still exists after update
|
|
ansible.builtin.stat:
|
|
path: "{{ gitea_runner_binary_path }}"
|
|
register: binary_stat
|
|
|
|
- name: Assert binary executable exists after update
|
|
ansible.builtin.assert:
|
|
that:
|
|
- binary_stat.stat.exists
|
|
fail_msg: "Runner binary missing after update"
|
|
|
|
- name: Check systemd user service still exists
|
|
ansible.builtin.stat:
|
|
path: "{{ gitea_runner_home }}/.config/systemd/user/gitea-runner.service"
|
|
register: service_stat
|
|
|
|
- name: Assert user service exists after update
|
|
ansible.builtin.assert:
|
|
that:
|
|
- service_stat.stat.exists
|
|
fail_msg: "Systemd user service missing after update"
|
|
|
|
- name: Check instance data directory still exists
|
|
ansible.builtin.stat:
|
|
path: "{{ gitea_runner_data_dir }}"
|
|
register: data_stat
|
|
|
|
- name: Assert data directory exists after update
|
|
ansible.builtin.assert:
|
|
that:
|
|
- data_stat.stat.exists
|
|
fail_msg: "Runner data directory missing after update"
|