|
|
||
|---|---|---|
| .github | ||
| defaults | ||
| handlers | ||
| meta | ||
| molecule/default | ||
| tasks | ||
| vars | ||
| .ansible-lint | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .later.yml | ||
| .pre-commit-config.yaml | ||
| .travis.yml | ||
| .yamllint | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| README.md | ||
| requirements.txt | ||
| requirements.yml | ||
| SECURITY.md | ||
| tox.ini | ||
gitlab_runner
Install and configure gitlab-runner on your system.
| GitHub | GitLab | Quality | Downloads | Version |
|---|---|---|---|---|
Example Playbook
This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.
---
- name: converge
hosts: all
become: yes
gather_facts: yes
roles:
- role: robertdebock.gitlab_runner
gitlab_runner_token: fake-token
gitlab_runner_register_runner: no
The machine needs to be prepared. In CI this is done using molecule/default/prepare.yml:
---
- name: prepare
hosts: all
become: yes
gather_facts: no
roles:
- role: robertdebock.bootstrap
Also see a full explanation and example on how to use these roles.
Role Variables
The default values for the variables are set in defaults/main.yml:
---
# defaults file for gitlab_runner
# These are the setting you need to register a runner.
# gitlab_runner_token: 123ABC
# Should this role register the gitlab runner?
gitlab_runner_register_runner: yes
# The name as shown in the GitLab webinterface.
gitlab_runner_name: "{{ ansible_fqdn }}"
# The URL to register the runner to.
gitlab_runner_url: "https://gitlab.com/"
# The tags, comma separated.
gitlab_runner_tags: "docker,my_runner"
# The type of executor. Choose from: "ssh", "shell", "parallels", "virtualbox",
# "docker", "docker_machine", "kubernetes" or "custom"
gitlab_runner_executor: docker
# The docker image to run.
gitlab_runner_docker_image: "alpine:latest"
Requirements
- pip packages listed in requirements.txt.
Status of used roles
The following roles are used to prepare a system. You can prepare your system in another way.
| Requirement | GitHub | GitLab |
|---|---|---|
| robertdebock.bootstrap |
Context
This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.
Here is an overview of related roles:

Compatibility
This role has been tested on these container images:
| container | tags |
|---|---|
| el | all |
| ubuntu | all |
The minimum version of Ansible required is 2.10, tests have been done to:
- The previous version.
- The current version.
- The development version.
Exceptions
Some roles can't run on a specific distribution or version. Here are some exceptions.
| variation | reason |
|---|---|
| Alpine | Not supported, see https://docs.gitlab.com/ee/install/requirements.html |
| Archlinux | Not supported, see https://docs.gitlab.com/ee/install/requirements.html |
| EL 8 | Not supported, see https://docs.gitlab.com/ee/install/requirements.html |
| Fedora | Not supported, see https://docs.gitlab.com/ee/install/requirements.html |
| Ubuntu rolling | Not supported, see https://docs.gitlab.com/ee/install/requirements.html |
| debian:buster | Not supported, see https://docs.gitlab.com/runner/install/linux-repository.html |
If you find issues, please register them in GitHub
License
Apache-2.0
Author Information
Please consider sponsoring me.