andrelohmann.github_runner

andrelohmann.github_runner

Install github runner

This role installs a new private github runner for your organization.

This role can be used in two ways, either use a registration token (valid for one hour) or use a personal access token and fetch the registration token at runtime.

To receive a registration token for your organization, got to Settings -> Actions -> Self-hosted runners -> Add new. Select your OS and architecture and copy the token. Be aware, that the token is only valid for one hour.

To fetch a github runner registration token at runtime from the api, the authentication with a personal access token with "admin:org" permissions is neccessary. Generate this personal access token at Settings -> Developer settings -> Personal access tokens -> Generate new token. Select scopes admin:org.

Role Variables

# 1) Use either the registration token
github_runner_registration_token: __YOUR_ORGANIZATION_REGISTRATION_TOKEN__
# 2) Or use a personal access token
github_runner_pat: __YOUR_PERSONAL_ACCESS_TOKEN__
# necessary variables
github_runner_organization: __YOUR_ORGANIZATION__
github_runner_name: __RUNNER_NAME__
github_runner_labels:
- label1
- label2

Optionsl Variables

github_runner_delete_existing: True

If an equally named runner already exists on the organization, it will be delted first, based on the github_runner_delete_existing variable setting (defaults to True).

Example Playbook

- hosts: github_runner
  roles:
  - andrelohmann.github_runner

License

MIT

Author Information

https://github.com/andrelohmann

About

install github runner

Install
ansible-galaxy install andrelohmann.github_runner
GitHub repository
License
Unknown
Downloads
69