Files
ansible-repo/playbooks/software/act_runner.yml
hogweed1 bb687e42b0
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1s
pipisa -->> act_runner
2025-11-27 13:34:11 +10:00

57 lines
1.5 KiB
YAML

---
- name: act_runner
hosts:
- ansible-slut.guaranteedstruggle.host
- pipisa.guaranteedstruggle.host
vars:
act_runner_version: '0.2.13'
gather_facts: yes
become: yes
tasks:
- name: Creates directory
ansible.builtin.file:
path: /usr/share/act_runner
state: directory
- name: Creates directory
ansible.builtin.file:
path: /etc/act_runner
state: directory
- name: Creates directory
ansible.builtin.file:
path: /var/lib/act_runner
state: directory
- name: get a file that needs to be downloaded
ansible.builtin.get_url:
url: https://dl.gitea.com/act_runner/{{act_runner_version}}/act_runner-{{act_runner_version}}-linux-amd64
dest: /usr/share/act_runner/act_runner-{{act_runner_version}}
mode: "0755"
- name: Create a symbolic link
ansible.builtin.file:
src: /usr/share/act_runner/act_runner-{{act_runner_version}}
dest: /usr/local/bin/act_runner
state: link
- name: Copy act_runner.service
register: act_runner_service_file
copy:
src: ../../files/act_runner/act_runner.service
dest: /etc/systemd/system/act_runner.service
# - name: ensure service
# ansible.builtin.systemd_service:
# name: act_runner
# state: started
# enabled: true
- name: Just force systemd to reread configs
ansible.builtin.systemd_service:
daemon_reload: true
when: act_runner_service_file.changed
#### TODO авторегистрация на основе токенов