This is a very simple role to install the GitLab Runner and the Docker components.
This role does not have any requirements.
Any combination of the following is tested:
- Operating System
- Ubuntu 20.04 LTS
- Debian 10
- Ansible
- 2.9.x
- 3.x
- 4.x
- Python
- 3.8
- 3.9
To install this role into your roles
folder just clone, download or run:
ansible-galaxy install --roles-path ./roles git+https://github.com/akutschi/ansible_gitlab_runner.git,v0.2.0
There are no settable variables in this role.
This role does not have any dependencies.
---
- hosts: servers
roles:
- ansible_gitlab_runner
This role does not register the runner. This has to be done manually:
gitlab-runner register \
--non-interactive \
--url "https://gitlab.com/" \
--registration-token "TOKEN" \
--executor "docker" \
--docker-image alpine:latest \
--tag-list $(uname -m),$(uname -o),docker \
--run-untagged="true" \
--name "$HOSTNAME"
The token for group and repo runners can be found under Settings -> CI/CD -> Runners
.
The reason for this manual step is, that one machine can have several runner configurations. And on top of that, if there will be several machines deployed for different architectures things get quickly difficult.
GPLv3, see license.
Feel free to open issues or merge requests if you find problems or have ideas for improvements. Thank you.