ansible/roles/forgejo_runners
Julien Riou 68e25a9ad5
Some checks failed
/ ansible-docsmith (push) Failing after 40s
/ molecule (certbot) (push) Failing after 38s
/ molecule (galene) (push) Has been cancelled
/ molecule (golang) (push) Has been cancelled
Initial commit
Signed-off-by: Julien Riou <julien@riou.xyz>
2026-02-17 09:35:08 +01:00
..
defaults Initial commit 2026-02-17 09:35:08 +01:00
handlers Initial commit 2026-02-17 09:35:08 +01:00
meta Initial commit 2026-02-17 09:35:08 +01:00
tasks Initial commit 2026-02-17 09:35:08 +01:00
templates Initial commit 2026-02-17 09:35:08 +01:00
README.md Initial commit 2026-02-17 09:35:08 +01:00
TODO.txt Initial commit 2026-02-17 09:35:08 +01:00

Ansible Role Forgejo Runners

Ansible role to manage Forgejo runners.

Configuration

See Variable precedence to find where you should put your own variables.

Then define at least forgejo_db_password with a strong and secure password, encrypted using ansible-vault.

Table of Content

Role variables

The following variables can be configured for this role:

Variable Type Required Default Description (abstract)
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_settings dict No N/A Dict of runners to configure

The key is the name of the repository on the instance

The value is a dict with a token key and optionally a dict of labels

forgejo_runners_version

⇑ Back to ToC ⇑

Version of the runners

  • Type: str
  • Required: No
  • Default: "9.1.1"

forgejo_runners_config_dir

⇑ Back to ToC ⇑

Path to the configuration directory of the runners

  • Type: path
  • Required: No
  • Default: "/etc/forgejo-runners"

forgejo_runners_instance

⇑ Back to ToC ⇑

URL of the Forgejo instance to register the runners

  • Type: str
  • Required: No

forgejo_runners_settings

⇑ Back to ToC ⇑

Dict of runners to configure

The key is the name of the repository on the instance

The value is a dict with a token key and optionally a dict of labels

  • Type: dict
  • Required: No

Usage

Example of a basic playbook:

- hosts: forgejo_runners
  roles:
    - forgejo_runners
  vars:
    forgejo_runners_instance: https://codeberg.org  # FIXME
    forgejo_runners:
      my_runner:
        token: **redacted**
        labels:
          node-latest: docker://data.forgejo.org/oci/node:latest

Then run the playbook:

ansible-playbook forgejo_runners.yml

Donate

As we all love FOSS projects, you should consider donating to Codeberg, the non-profit organization behind Forgejo.