Files
ansible-repo/playbooks/software/act_runner.yml
hogweed1 100445172a
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m30s
add torrents-slut1
2025-11-30 14:18:46 +10:00

58 lines
1.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
- 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 авторегистрация на основе токенов
# если ещё не работает то гнать регистрацию с токенов в хост-групп-варсах