Gitea Runner Setup
Deploys a gitea action runner for hosts.
state
At this time only labels will be configerd. Maybe if need i will add some more options later.
minimal setup
playbook
- hosts: runner
roles:
- setup-gitea-runner
vars
host (recommend)
RUNNER_TOKEN: '1234567890'
RUNNER_LABELS:
- mylabel
- otherlabel
Before register the runner and run it, you need a registration token. The level of the runner determines where to obtain the registration token.
Instance level: The admin settings page, like your_gitea.com/admin/actions/runners.
Organization level: The organization settings page, like your_gitea.com/org/settings/actions/runners.
Repository level: The repository settings page, like your_gitea.com/owner/repo/settings/actions/runners.
group (recommend)
RUNNER_INSTANCE: https://your_gitea.com/
Hint: A token can register multible runners, in some cases it can make sense var RUNNER_TOKEN and RUNNER_LABELS define in a group.
For all vars look at defaults!
features
redeploy a runner
Somtimes it is need to redeploy a runner (with other token e.g.). in this case you can simply use this:
RUNNER_REDEPLOY: true
Hint: should remove after usage!
Hint 2: you can use --extra-vars in command for sinlge use:
ansible-playbook playbooks/git-runners.yml -l runnerhost --extra-vars '{"RUNNER_REDEPLOY": true}'
With this option ansible delete the .runner file. Without this file ansible do a new registration for this runner.