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