Add gitea-runners (work in progress)

This commit is contained in:
Timo Makinen 2023-03-14 17:24:24 +00:00
parent 2ca8615351
commit a21159f158
8 changed files with 92 additions and 0 deletions

View file

@ -0,0 +1,2 @@
---
gitea_runner_version: main

View file

@ -0,0 +1,7 @@
---
- name: Build act_runner
ansible.builtin.command:
argv:
- make
- build
chdir: /usr/local/src/act_runner

View file

@ -0,0 +1,4 @@
---
dependencies:
- {role: docker}
- {role: git}

View file

@ -0,0 +1,49 @@
---
- name: Create group
ansible.builtin.group:
name: act_runner
system: true
- name: Create user
ansible.builtin.user:
name: act_runner
system: true
comment: Gitea act_runner
create_home: false
home: /var/empty
group: act_runner
groups:
- docker
shell: /sbin/nologin
- name: Install dependencies
ansible.builtin.package:
name: "{{ item }}"
state: installed
with_items:
- golang
- make
- name: Copy act runner packages
ansible.builtin.git:
dest: /usr/local/src/act_runner
repo: https://gitea.com/gitea/act_runner.git
version: "{{ gitea_runner_version }}"
notify: Build act_runner
- name: Link binary
ansible.builtin.file:
dest: /usr/local/sbin/act_runner
src: /usr/local/src/act_runner/act_runner
state: link
owner: root
group: "{{ ansible_wheel }}"
follow: false
- name: Create config directory
ansible.builtin.file:
path: /var/lib/act_runner
state: directory
mode: 0770
owner: root
group: act_runner