feat: support multiple Gitea instances for actions runner

The gitea-actions role now uses a `gitea_runners` list instead of a
single `gitea_instance_url`. Each instance gets its own config, systemd
service, working directory, and cache. Migrates from the old single
`act_runner.service` to per-instance `act_runner-{name}.service`.

Adds git.skudak.com alongside git.debyl.io as runner targets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bastian de Byl
2026-03-28 17:04:23 -04:00
parent 43fbcf59a5
commit dbd898cb2f
6 changed files with 61 additions and 26 deletions

View File

@@ -15,31 +15,36 @@
mode: "0755"
tags: gitea-actions
- name: create act_runner working directory
- name: create per-runner working directory
become: true
ansible.builtin.file:
path: "{{ act_runner_work_dir }}"
path: "{{ act_runner_work_dir }}/{{ item.name }}"
state: directory
owner: "{{ gitea_runner_user }}"
group: "{{ gitea_runner_user }}"
mode: "0755"
loop: "{{ gitea_runners }}"
tags: gitea-actions
- name: create act_runner cache directory
- name: create per-runner cache directory
become: true
ansible.builtin.file:
path: "{{ act_runner_work_dir }}/cache"
path: "{{ act_runner_work_dir }}/{{ item.name }}/cache"
state: directory
owner: "{{ gitea_runner_user }}"
group: "{{ gitea_runner_user }}"
mode: "0755"
loop: "{{ gitea_runners }}"
tags: gitea-actions
- name: deploy act_runner configuration
- name: deploy per-runner configuration
become: true
ansible.builtin.template:
src: config.yaml.j2
dest: "{{ act_runner_config_dir }}/config.yaml"
dest: "{{ act_runner_config_dir }}/config-{{ item.name }}.yaml"
mode: "0644"
notify: restart act_runner
vars:
runner_name: "{{ item.name }}"
loop: "{{ gitea_runners }}"
notify: restart act_runner services
tags: gitea-actions

View File

@@ -1,17 +1,37 @@
---
- name: deploy act_runner systemd service
become: true
ansible.builtin.template:
src: act_runner.service.j2
dest: /etc/systemd/system/act_runner.service
mode: "0644"
notify: restart act_runner
tags: gitea-actions
- name: enable act_runner service
- name: stop and disable legacy act_runner service
become: true
ansible.builtin.systemd:
name: act_runner
state: stopped
enabled: false
failed_when: false
tags: gitea-actions
- name: remove legacy act_runner service file
become: true
ansible.builtin.file:
path: /etc/systemd/system/act_runner.service
state: absent
tags: gitea-actions
- name: deploy per-runner systemd service
become: true
ansible.builtin.template:
src: act_runner.service.j2
dest: "/etc/systemd/system/act_runner-{{ item.name }}.service"
mode: "0644"
vars:
runner_name: "{{ item.name }}"
loop: "{{ gitea_runners }}"
notify: restart act_runner services
tags: gitea-actions
- name: enable per-runner services
become: true
ansible.builtin.systemd:
name: "act_runner-{{ item.name }}"
daemon_reload: true
enabled: true
loop: "{{ gitea_runners }}"
tags: gitea-actions