robertdebock.gitlab_runner
Ansible Role GitLab Runner
This guide shows you how to install and set up GitLab Runner on your system.
GitHub | GitLab | Downloads | Version |
---|---|---|---|
Example Playbook
Here is a simple playbook example taken from molecule/default/converge.yml
. It has been tested regularly.
---
- name: Setup
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.gitlab_runner
gitlab_runner_tags:
- docker
- my_runner
Make sure your machine is ready. In Continuous Integration (CI), this is done using molecule/default/prepare.yml
:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
You can check a detailed explanation and example for using these roles.
Role Variables
Default values for the variables are in defaults/main.yml
:
---
# Default settings for GitLab Runner
# Token to register a runner.
# gitlab_runner_registration_token: "123ABC"
# The name shown in the GitLab web interface.
gitlab_runner_name: "{{ ansible_fqdn }}"
# URL to register the runner.
gitlab_runner_url: "https://gitlab.com/"
# Executor type. Options: "ssh", "shell", "parallels", "virtualbox",
# "docker", "docker_machine", "kubernetes", or "custom"
gitlab_runner_executor: docker
# Docker image to use.
gitlab_runner_docker_image: "alpine:latest"
# GitLab runner version to install.
gitlab_runner_version: "16.3.1"
# Number of concurrent jobs allowed.
gitlab_runner_concurrency: "{{ ansible_processor_vcpus }}"
# Enable or disable privileged runner.
gitlab_runner_privileged: true
Requirements
- Python packages listed in requirements.txt.
State of Used Roles
The following roles help set up the system. You can prepare your system differently if you wish.
Requirement | GitHub | GitLab |
---|---|---|
robertdebock.bootstrap |
Context
This role works with many other roles. For more information, check the documentation of these roles.
Related Roles
Compatibility
This role has been tested on these container images:
Container | Tags |
---|---|
EL | 9 |
Ubuntu | focal |
Ansible version 2.12 or higher is required, and tests have been performed on:
- The previous version.
- The current version.
- The development version.
Report any issues on GitHub.
License
Author Information
Created by robertdebock.
Consider sponsoring me.
Install and configure gitlab-runner on your system.
ansible-galaxy install robertdebock.gitlab_runner