Files
grm/ansible/roles/gitea_runner/tasks/main.yml
T

48 lines
1.6 KiB
YAML

---
# Implements: REQ-6 (GRM-173) — a CI runner must never be installed on a
# production host (production workloads must not share hardware with
# arbitrary CI jobs, and runner cleanup logic assumes a dedicated host).
- name: Check for production-host marker
ansible.builtin.stat:
path: "{{ gitea_runner_production_marker_path }}"
register: gitea_runner_production_marker
- name: Fail on production hosts
ansible.builtin.fail:
msg: >-
Refusing to install a CI runner on a production host
(marker: {{ gitea_runner_production_marker_path }} present or
gitea_runner_on_production_host=true). Set
gitea_runner_allow_production_host=true to override.
when:
- not gitea_runner_allow_production_host
- gitea_runner_on_production_host or gitea_runner_production_marker.stat.exists
- name: Include systemd availability check
ansible.builtin.include_tasks: systemd_check.yml
- name: Include user setup
ansible.builtin.include_tasks: user_setup.yml
- name: Include rootless Docker setup
ansible.builtin.include_tasks: rootless_docker.yml
- name: Include runner install
ansible.builtin.include_tasks: install_runner.yml
- name: Include prune setup
ansible.builtin.include_tasks: prune.yml
- name: Include healthcheck setup
ansible.builtin.include_tasks: healthcheck.yml
- name: Include pre-pull images
ansible.builtin.include_tasks: pre_pull_images.yml
- name: Include pre-cache timer
ansible.builtin.include_tasks: pre_cache.yml
- name: Include integration test
ansible.builtin.include_tasks: integration_test.yml
when: not gitea_runner_skip_registration