Ansible role to install and configure a GitHub self-hosted runner.
Building and improving this Ansible role have been sponsored by my current and previous employers like Cloudpunks GmbH and Proact Deutschland GmbH.
- Requirements
- Default Variables
- github_runner_api
- github_runner_arch
- github_runner_args
- github_runner_as_root
- github_runner_dir
- github_runner_download
- github_runner_enterprise
- github_runner_envvars
- github_runner_group
- github_runner_groups
- github_runner_hide_sensitive_logs
- github_runner_labels
- github_runner_name
- github_runner_org
- github_runner_reinstall
- github_runner_repo
- github_runner_state
- github_runner_system
- github_runner_token
- github_runner_url
- github_runner_user
- github_runner_version
- runner_runner_grouping
- Discovered Tags
- Dependencies
- License
- Author
- Minimum Ansible version:
2.10
API URL to access GitHub
github_runner_api: https://api.github.com
Architecture of the system
github_runner_arch: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'x64' }}"
Optional arguments for the runner
github_runner_args:
Install service as root
github_runner_as_root: false
Home and working path
github_runner_dir: /home/runner
URL to download the runner from
github_runner_download: https://github.com/actions/runner/releases/download/v{{ github_runner_version
}}/actions-runner-{{ github_runner_system }}-{{ github_runner_arch }}-{{ github_runner_version
}}.tar.gz
Enterprise to register the runner
github_runner_enterprise:
Additional env variables injected into .env
github_runner_envvars:
Group user for the runner processes
github_runner_group: runner
Additional groups for the runner
github_runner_groups:
- sudo
- docker
Hide potentially sensitive logs
github_runner_hide_sensitive_logs: false
Labels for the runner
github_runner_labels:
- self-hosted
Name of the runner
github_runner_name: '{{ ansible_hostname }}'
Organization to register the runner
github_runner_org:
Always reinstall the service
github_runner_reinstall: false
Repo to register the runner
github_runner_repo:
State of the runner service
github_runner_state: started
Operating system for the runner
github_runner_system: "{{ 'osx' if ansible_system == 'Darwin' else 'linux' }}"
Personal access token for runner registration token retrieval
github_runner_token:
General URL to access GitHub
github_runner_url: https://github.com
User used for the runner processes
github_runner_user: runner
Version fo the runner
github_runner_version: 2.321.0
Optional group name for the runner
runner_runner_grouping:
github-runner
- None
Apache-2.0