Files
gatehouse-api/deploy/ansible/install-runner.yml
T
SangNguyen c4da5ab594
Push -> develop / Build Docker images (push) Failing after 8s
Push -> develop / Rolling deploy (push) Has been skipped
Push -> develop / Notify on result (push) Successful in 1s
ci: add gitea + runner
2026-06-23 00:26:00 +00:00

29 lines
817 B
YAML

---
- name: Install Gitea Actions self-hosted runners
hosts: all
become: true
pre_tasks:
- name: Assert host defines a runners matrix
ansible.builtin.assert:
that:
- runners is defined
- runners | length > 0
- runner_env is defined
fail_msg: "Host {{ inventory_hostname }} is missing host_vars (runners / runner_env)."
tasks:
- name: Ensure runner service user exists
ansible.builtin.user:
name: "{{ runner_user }}"
shell: /bin/bash
create_home: true
home: "{{ runner_home }}"
- name: Install runners for each project
ansible.builtin.include_tasks: tasks/install_project.yml
loop: "{{ runners }}"
loop_control:
loop_var: project_spec
label: "{{ project_spec.project }}"