add local runner mfanyakazi to gitea
This commit is contained in:
parent
f8bca9ea32
commit
8337a14161
@ -4,6 +4,7 @@
|
|||||||
become: true
|
become: true
|
||||||
vars_files:
|
vars_files:
|
||||||
- ../../vars/secrets.yml
|
- ../../vars/secrets.yml
|
||||||
|
- ../../vars/vars.yml
|
||||||
vars:
|
vars:
|
||||||
postgresql_user: gitea
|
postgresql_user: gitea
|
||||||
postgresql_db: giteadb
|
postgresql_db: giteadb
|
||||||
@ -159,8 +160,8 @@
|
|||||||
src: /home/ubuntu/hifadhi_kuu/gitea/act_runner-0.2.11-linux-amd64
|
src: /home/ubuntu/hifadhi_kuu/gitea/act_runner-0.2.11-linux-amd64
|
||||||
remote_src: true
|
remote_src: true
|
||||||
dest: /usr/local/bin/act_runner
|
dest: /usr/local/bin/act_runner
|
||||||
owner: ansible
|
owner: git
|
||||||
mode: '0744'
|
mode: '0755'
|
||||||
|
|
||||||
- name: configure the gitea action runner non-interactively
|
- name: configure the gitea action runner non-interactively
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
@ -173,9 +174,13 @@
|
|||||||
args:
|
args:
|
||||||
chdir: /home/ubuntu/hifadhi_kuu/gitea
|
chdir: /home/ubuntu/hifadhi_kuu/gitea
|
||||||
|
|
||||||
- name: start the act_runner daemon
|
- name: install the act_runner systemd service
|
||||||
ansible.builtin.shell:
|
ansible.builtin.template:
|
||||||
cmd: |
|
src: ../../templates/act_runner.service.j2
|
||||||
act_runner daemon
|
dest: /etc/systemd/system/act_runner.service
|
||||||
args:
|
|
||||||
chdir: /home/ubuntu/hifadhi_kuu/gitea
|
- 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