running gitea as a daemon. ansible hangs

This commit is contained in:
Ibrahim Mkusa 2024-11-05 11:02:03 -05:00
parent 4d6f6981ec
commit f8bca9ea32

View File

@ -149,12 +149,33 @@
state: started state: started
enabled: yes enabled: yes
- name: start the action docker runner - name: download the gitea action binary if it doesn't exist
community.docker.docker_container: ansible.builtin.get_url:
name: gitea_runner url: https://gitea.com/gitea/act_runner/releases/download/v0.2.11/act_runner-0.2.11-linux-amd64
state: started dest: /home/ubuntu/hifadhi_kuu/gitea
image: gitea/act_runner:latest
env: - name: copy the gitea runner binary to /usr/local/bin directory
GITEA_INSTANCE_URL: "https://gitea.kwerezigua.org" copy:
GITEA_RUNNER_REGISTRATION_TOKEN: "{{gitea_action_token}}" src: /home/ubuntu/hifadhi_kuu/gitea/act_runner-0.2.11-linux-amd64
GITEA_RUNNER_NAME: "mfanyakazi" remote_src: true
dest: /usr/local/bin/act_runner
owner: ansible
mode: '0744'
- name: configure the gitea action runner non-interactively
ansible.builtin.shell:
cmd: |
chmod +x /usr/local/bin/act_runner
act_runner --version
act_runner register --no-interactive --instance \
https://gitea.kwerezigua.org --token "{{gitea_action_token}}" \
--name mfanyakazi
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