add local runner mfanyakazi to gitea
This commit is contained in:
parent
f8bca9ea32
commit
8337a14161
@ -4,6 +4,7 @@
|
||||
become: true
|
||||
vars_files:
|
||||
- ../../vars/secrets.yml
|
||||
- ../../vars/vars.yml
|
||||
vars:
|
||||
postgresql_user: gitea
|
||||
postgresql_db: giteadb
|
||||
@ -159,8 +160,8 @@
|
||||
src: /home/ubuntu/hifadhi_kuu/gitea/act_runner-0.2.11-linux-amd64
|
||||
remote_src: true
|
||||
dest: /usr/local/bin/act_runner
|
||||
owner: ansible
|
||||
mode: '0744'
|
||||
owner: git
|
||||
mode: '0755'
|
||||
|
||||
- name: configure the gitea action runner non-interactively
|
||||
ansible.builtin.shell:
|
||||
@ -173,9 +174,13 @@
|
||||
args:
|
||||
chdir: /home/ubuntu/hifadhi_kuu/gitea
|
||||
|
||||
- name: start the act_runner daemon
|
||||
ansible.builtin.shell:
|
||||
cmd: |
|
||||
act_runner daemon
|
||||
args:
|
||||
chdir: /home/ubuntu/hifadhi_kuu/gitea
|
||||
- name: install the act_runner systemd service
|
||||
ansible.builtin.template:
|
||||
src: ../../templates/act_runner.service.j2
|
||||
dest: /etc/systemd/system/act_runner.service
|
||||
|
||||
- name: start the gitea action service
|
||||
service:
|
||||
name: act_runner
|
||||
state: restarted
|
||||
enabled: true
|
||||
|
15
templates/act_runner.service.j2
Normal file
15
templates/act_runner.service.j2
Normal file
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Gitea Actions runner
|
||||
Documentation=https://gitea.com/gitea/act_runner
|
||||
After=docker.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/act_runner daemon
|
||||
ExecReload=/bin/kill -s HUP $MAINPID
|
||||
WorkingDirectory={{gitea_action_dir}}
|
||||
TimeoutSec=0
|
||||
RestartSec=10
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
2
vars/vars.yml
Normal file
2
vars/vars.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
gitea_action_dir: /home/ubuntu/hifadhi_kuu/gitea/
|
Loading…
Reference in New Issue
Block a user