Update to Fedora Rawhide, make act_runner name consistent, change file where runner registration data is tored
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
- name: Install Act Runner
|
- name: Install Act Runner
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: "https://gitea.com/gitea/act_runner/releases/download/v{{ gitea_runner_version }}/act_runner-{{ gitea_runner_version }}-linux-amd64"
|
url: "https://gitea.com/gitea/act_runner/releases/download/v{{ gitea_runner_version }}/act_runner-{{ gitea_runner_version }}-linux-amd64"
|
||||||
dest: "/usr/local/bin/act-runner"
|
dest: "/usr/local/bin/act_runner"
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
force: "{{ (ansible_facts['cmdline']['force'] is defined) | default(false) }}"
|
force: "{{ (ansible_facts['cmdline']['force'] is defined) | default(false) }}"
|
||||||
retries: 3
|
retries: 3
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
runner:
|
runner:
|
||||||
# Where to store the registration result.
|
# Where to store the registration result.
|
||||||
file: .runner
|
file: /var/lib/act_runner/.runner
|
||||||
# Execute how many tasks concurrently at the same time.
|
# Execute how many tasks concurrently at the same time.
|
||||||
capacity: 1
|
capacity: 1
|
||||||
# Extra environment variables to run jobs.
|
# Extra environment variables to run jobs.
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
# If it's empty when registering, it will ask for inputting labels.
|
# If it's empty when registering, it will ask for inputting labels.
|
||||||
# If it's empty when execute `daemon`, will use labels in `.runner` file.
|
# If it's empty when execute `daemon`, will use labels in `.runner` file.
|
||||||
labels:
|
labels:
|
||||||
- "rocky-latest:host:local"
|
- "fedora-rawhide-latest:host:local"
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
# Enable cache server to use actions/cache.
|
# Enable cache server to use actions/cache.
|
||||||
@@ -146,12 +146,12 @@
|
|||||||
|
|
||||||
- name: Register the runner with Gitea (if not already registered)
|
- name: Register the runner with Gitea (if not already registered)
|
||||||
ansible.builtin.command: >
|
ansible.builtin.command: >
|
||||||
/usr/local/bin/act-runner register
|
/usr/local/bin/act_runner register
|
||||||
--no-interactive
|
--no-interactive
|
||||||
--config /etc/act_runner/config.yaml
|
--config /etc/act_runner/config.yaml
|
||||||
--instance https://git.phyllo.me
|
--instance https://git.phyllo.me
|
||||||
--token {{ registration_token }}
|
--token {{ registration_token }}
|
||||||
--name rl-bios-0
|
--name fraw-bios-0
|
||||||
when: not runner_registered.stat.exists
|
when: not runner_registered.stat.exists
|
||||||
changed_when: true
|
changed_when: true
|
||||||
|
|
||||||
@@ -160,28 +160,26 @@
|
|||||||
content: |
|
content: |
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Gitea Actions Runner
|
Description=Gitea Actions Runner
|
||||||
|
Documentation=https://gitea.com/gitea/act_runner
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
ExecStart=/usr/local/bin/act_runner daemon --config /etc/act_runner/config.yaml
|
||||||
User=act_runner
|
|
||||||
ExecStart=/usr/local/bin/act-runner daemon --config /etc/act_runner/config.yaml
|
|
||||||
ExecReload=/bin/kill -s HUP $MAINPID
|
ExecReload=/bin/kill -s HUP $MAINPID
|
||||||
WorkingDirectory=/var/lib/act_runner
|
WorkingDirectory=/var/lib/act_runner
|
||||||
TimeoutSec=0
|
TimeoutSec=0
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
User=act_runner
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
dest: /etc/systemd/system/act-runner.service
|
dest: /etc/systemd/system/act_runner.service
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
backup: yes
|
backup: yes
|
||||||
|
|
||||||
- name: Ensure act-runner service is enabled and started
|
- name: Ensure act_runner service is enabled and started
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: act-runner
|
name: act_runner
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
Reference in New Issue
Block a user