fix service not starting properly
Some checks failed
Deploy Containers / Prepare (push) Failing after 3s

This commit is contained in:
2025-07-29 21:26:57 -04:00
parent c8cceee3a9
commit 4a44efb0a8
3 changed files with 29 additions and 5 deletions

View File

@@ -19,22 +19,30 @@
mode: 0755
when: not act_runner.stat.exists
- name: Copy Gitea Act Runner Config
template:
src: config.yml.j2
dest: "{{ data_dir }}/gitea/config.yml"
- name: Check if Act Runner is a Systemd Service
stat:
path: "/etc/systemd/system/act_runner.service"
register: act_runner_service
- name: Stop & remove systemd service
become: yes
shell: |
systemctl stop act_runner.service &&
rm /etc/systemd/system/act_runner.service
- name: Create Systemd Service
become: yes
template:
src: act_runner.service.j2
dest: "/etc/systemd/system/act_runner.service"
when: not act_runner_service.stat.exists
- name: Enable Systemd Service
become: yes
command: systemctl enable act_runner.service
when: not act_runner_service.stat.exists
- name: Start Systemd Service
become: yes
command: systemctl start act_runner.service
when: not act_runner_service.stat.exists