Files
grm/ansible/roles/gitea-runner/molecule/default/verify.yml
T

53 lines
1.4 KiB
YAML

---
- name: Verify
hosts: all
become: true
tasks:
- name: Check act_runner binary exists
ansible.builtin.stat:
path: /usr/local/bin/act_runner
register: act_runner_stat
- name: Assert act_runner binary exists
ansible.builtin.assert:
that:
- act_runner_stat.stat.exists
fail_msg: "act_runner binary is missing"
- name: Check Docker is installed
ansible.builtin.command: docker --version
changed_when: false
- name: Check systemd service file exists
ansible.builtin.stat:
path: "/etc/systemd/system/act-runner-molecule-test-runner.service"
register: service_stat
- name: Assert service file exists
ansible.builtin.assert:
that:
- service_stat.stat.exists
fail_msg: "Systemd service file is missing"
- name: Check prune timer exists
ansible.builtin.stat:
path: /etc/systemd/system/docker-prune.timer
register: timer_stat
- name: Assert prune timer exists
ansible.builtin.assert:
that:
- timer_stat.stat.exists
fail_msg: "Docker prune timer is missing"
- name: Check config file exists
ansible.builtin.stat:
path: /etc/act-runner/config.toml
register: config_stat
- name: Assert config file exists
ansible.builtin.assert:
that:
- config_stat.stat.exists
fail_msg: "Config file is missing"