feat: Add labels to runners
All checks were successful
/ ansible-docsmith (push) Successful in 30s

Fixes #2.

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2026-02-16 08:08:07 +01:00
commit c02dc6a20a
Signed by: jriou
GPG key ID: 9A099EDA51316854
7 changed files with 49 additions and 24 deletions

View file

@ -78,7 +78,7 @@ The following variables can be configured for this role:
| `forgejo_runners_version` | `str` | No | `"9.1.1"` | Version of the runners |
| `forgejo_runners_config_dir` | `path` | No | `"/etc/forgejo-runners"` | Path to the configuration directory of the runners |
| `forgejo_runners_instance` | `str` | No | N/A | URL of the Forgejo instance to register the runners |
| `forgejo_runners` | `dict` | No | N/A | List of runners to configure<br><br>The key is the name of the repository on the instance<br><br>The value is the token |
| `forgejo_runners` | `dict` | No | N/A | List of runners to configure<br><br>The key is the name of the repository on the instance<br><br>The value is a dict with a `token` key and optionally a dict of `labels` |
### `forgejo_server`<a id="variable-forgejo_server"></a>
@ -283,7 +283,7 @@ List of runners to configure
The key is the name of the repository on the instance
The value is the token
The value is a dict with a `token` key and optionally a dict of `labels`
- **Type**: `dict`
- **Required**: No
@ -309,6 +309,28 @@ Then run the playbook:
ansible-playbook forgejo.yml
```
## Runners
Example of runners configuration:
```yaml
- hosts: forgejo
roles:
- jriou.forgejo
vars:
forgejo_runners:
coller:
token: **redacted**
labels:
debian12: docker://data.forgejo.org/oci/debian:bookworm
debian13: docker://data.forgejo.org/oci/debian:trixie
ansible:
token: **redacted**
labels:
docker: docker://data.forgejo.org/oci/node:latest
```
## Donate
As we all love FOSS projects, you should consider [donating to